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

QueryMasterTask never finished when Internal error occurs.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: