Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-630

QueryMasterTask never finished when Internal error occurs.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.8.0, 0.9.0
    • 0.8.0, 0.9.0
    • None
    • None

    Description

      Query state is changed to QUERY_ERROR when QueryEventType.INTERNAL_ERROR occurs, and QueryFinishEventHandler invoked.
      However, there is no check logic for QUERY_ERROR. So stopQuery() never called.
      QueryMasterTask.java

        private class QueryFinishEventHandler implements EventHandler<QueryMasterQueryCompletedEvent> {
          @Override
          public void handle(QueryMasterQueryCompletedEvent event) {
            QueryId queryId = event.getQueryId();
            LOG.info("Query completion notified from " + queryId);
      
            while (!isTerminatedState(query.getState())) {
              try {
                synchronized (this) {
                  wait(10);
                }
              } catch (InterruptedException e) {
                LOG.error(e);
              }
            }
            LOG.info("Query final state: " + query.getState());
            queryMasterContext.stopQuery(queryId);
          }
      
          private boolean isTerminatedState(QueryState state) {
            return
                state == QueryState.QUERY_SUCCEEDED ||
                state == QueryState.QUERY_FAILED ||
                state == QueryState.QUERY_KILLED;
          }
        }
      

      Attachments

        1. TAJO-630.patch
          0.8 kB
          Hyunsik Choi

        Activity

          People

            hyunsik Hyunsik Choi
            hjkim Hyoungjun Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: