Return-Path: X-Original-To: apmail-tajo-dev-archive@minotaur.apache.org Delivered-To: apmail-tajo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 783F510693 for ; Mon, 25 Nov 2013 07:04:00 +0000 (UTC) Received: (qmail 53279 invoked by uid 500); 25 Nov 2013 07:04:00 -0000 Delivered-To: apmail-tajo-dev-archive@tajo.apache.org Received: (qmail 53203 invoked by uid 500); 25 Nov 2013 07:03:59 -0000 Mailing-List: contact dev-help@tajo.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tajo.incubator.apache.org Delivered-To: mailing list dev@tajo.incubator.apache.org Received: (qmail 53191 invoked by uid 99); 25 Nov 2013 07:03:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Nov 2013 07:03:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Nov 2013 07:03:57 +0000 Received: (qmail 51581 invoked by uid 99); 25 Nov 2013 07:03:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Nov 2013 07:03:35 +0000 Date: Mon, 25 Nov 2013 07:03:35 +0000 (UTC) From: "Hyunsik Choi (JIRA)" To: dev@tajo.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TAJO-325) QueryState.NEW and QueryState.INIT should be combined into one state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TAJO-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13831214#comment-13831214 ] Hyunsik Choi commented on TAJO-325: ----------------------------------- +1 I reviewed the patch. The patch looks good, and passes all unit tests and rat check. > 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 > 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 { > @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)