You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2013/11/25 08:07:36 UTC

[jira] [Resolved] (TAJO-325) QueryState.NEW and QueryState.INIT should be combined into one state

     [ https://issues.apache.org/jira/browse/TAJO-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyunsik Choi resolved TAJO-325.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8-incubating

> QueryState.NEW and QueryState.INIT should be combined into one state
> --------------------------------------------------------------------
>
>                 Key: TAJO-325
>                 URL: https://issues.apache.org/jira/browse/TAJO-325
>             Project: Tajo
>          Issue Type: Improvement
>          Components: master
>    Affects Versions: 0.8-incubating
>            Reporter: Min Zhou
>            Assignee: Min Zhou
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-325.diff
>
>
> From the diagram uploaded at TAJO-320, we know that in the beginning of a Query. It first in New state, and  instantly become INIT state because QueryMasterTask generate INIT and START event in succession.
> {noformat}
>       queryTaskContext.getEventHandler().handle(new QueryEvent(queryId,
>           QueryEventType.INIT));
>       queryTaskContext.getEventHandler().handle(new QueryEvent(queryId,
>           QueryEventType.START));
> {noformat}
> There is no gap between those two event,  and the init transition in Query show that  that transition will do nothing except log the start time.  It couldn't transit to FAILED state since there's no condition to FAILED.
> {noformat}
>   static class InitTransition
>       implements MultipleArcTransition<Query, QueryEvent, QueryState> {
>     @Override
>     public QueryState transition(Query query, QueryEvent queryEvent) {
>       query.setStartTime();
>       //query.context.setState(QueryState.QUERY_INIT);
>       return QueryState.QUERY_INIT;
>     }
>   }
> {noformat}
> For simplicity, I suggest combine those two state into one.   When I was writing code on TAJO-305,  I came across the problem I need to deal with those two state and found that I need to write some useless transitions for one of the two states. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)