You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2014/03/01 06:11:21 UTC

[jira] [Commented] (TAJO-630) QueryMasterTask never finished when Internal error occurs.

    [ https://issues.apache.org/jira/browse/TAJO-630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13916937#comment-13916937 ] 

Hyunsik Choi commented on TAJO-630:
-----------------------------------

Could you anyone can review this?

> QueryMasterTask never finished when Internal error occurs.
> ----------------------------------------------------------
>
>                 Key: TAJO-630
>                 URL: https://issues.apache.org/jira/browse/TAJO-630
>             Project: Tajo
>          Issue Type: Bug
>    Affects Versions: 0.8-incubating, 1.0-incubating
>            Reporter: hyoungjunkim
>            Assignee: Hyunsik Choi
>            Priority: Minor
>         Attachments: TAJO-630.patch
>
>
> 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
> {code}
>   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;
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)