Return-Path: X-Original-To: apmail-falcon-dev-archive@minotaur.apache.org Delivered-To: apmail-falcon-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 34540189C8 for ; Fri, 18 Dec 2015 09:20:50 +0000 (UTC) Received: (qmail 86098 invoked by uid 500); 18 Dec 2015 09:20:50 -0000 Delivered-To: apmail-falcon-dev-archive@falcon.apache.org Received: (qmail 86050 invoked by uid 500); 18 Dec 2015 09:20:50 -0000 Mailing-List: contact dev-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list dev@falcon.apache.org Received: (qmail 86039 invoked by uid 99); 18 Dec 2015 09:20:50 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2015 09:20:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 945AEC73D3 for ; Fri, 18 Dec 2015 09:20:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xntJnkp1lcz9 for ; Fri, 18 Dec 2015 09:20:48 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 965AB201F7 for ; Fri, 18 Dec 2015 09:20:47 +0000 (UTC) Received: (qmail 85948 invoked by uid 99); 18 Dec 2015 09:20:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2015 09:20:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9A6B12C1F56 for ; Fri, 18 Dec 2015 09:20:46 +0000 (UTC) Date: Fri, 18 Dec 2015 09:20:46 +0000 (UTC) From: "pavan kumar kolamuri (JIRA)" To: dev@falcon.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FALCON-1674) Fix the mapping of InstanceState status to workflow Status in InstancesResult MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FALCON-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15063745#comment-15063745 ] pavan kumar kolamuri edited comment on FALCON-1674 at 12/18/15 9:20 AM: ------------------------------------------------------------------------ Ajay Yadava: {noformat} After an offline discussion with @pavan kumar kolamuri, here are some key points which I am not sure are the best way to do it. A new WorkflowStatus has been added, since we are changing only scheduler, a new status for workflow(READY) looks odd to me. It is not used anywhere in OozieWorkflowEngine, so the two engines api are now out of sync. There is a bad coupling between two Enums - InstanceState.STATE, and InstancesResult.WorkflowStatus e.g. in the following code (It may not be the only place where this is being done, but I am taking this as I used it for discussion with Pavan Kumar Kolamuri) case RERUN: executor.rerun(instance, userProps, isForced); instanceInfo.status = InstancesResult.WorkflowStatus.valueOf(STATE_STORE .getExecutionInstance(instance.getId()).getCurrentState().name()); break; STATE_STORE.getExecutionInstance(instance.getId()).getCurrentState() returns InstanceState.STATE and it's name is used to generate an enum of type InstancesResult.WorkflowStatus. Both the enums have some states which don't make sense for others. InstancesResult.WorkflowStatus was earlier used to return workflow status(which was never ready), now it seems to be used to return status for what earlier were Coordinator Action status which were. I think we should maintain that separation for the sake of compatibility across two engines. {noformat} was (Author: pavan kumar): Ajay Yadava: {noformat} After an offline discussion with @pavan kumar kolamuri, here are some key points which I am not sure are the best way to do it. A new WorkflowStatus has been added, since we are changing only scheduler, a new status for workflow(READY) looks odd to me. It is not used anywhere in OozieWorkflowEngine, so the two engines api are now out of sync. There is a bad coupling between two Enums - InstanceState.STATE, and InstancesResult.WorkflowStatus e.g. in the following code (It may not be the only place where this is being done, but I am taking this as I used it for discussion with Pavan Kumar Kolamuri) case RERUN: executor.rerun(instance, userProps, isForced); instanceInfo.status = InstancesResult.WorkflowStatus.valueOf(STATE_STORE .getExecutionInstance(instance.getId()).getCurrentState().name()); break; STATE_STORE.getExecutionInstance(instance.getId()).getCurrentState() returns InstanceState.STATE and it's name is used to generate an enum of type InstancesResult.WorkflowStatus. Both the enums have some states which don't make sense for others. InstancesResult.WorkflowStatus was earlier used to return workflow status(which was never ready), now it seems to be used to return status for what earlier were Coordinator Action status which were. I think we should maintain that separation for the sake of compatibility across two engines. {noformat} > Fix the mapping of InstanceState status to workflow Status in InstancesResult > ----------------------------------------------------------------------------- > > Key: FALCON-1674 > URL: https://issues.apache.org/jira/browse/FALCON-1674 > Project: Falcon > Issue Type: Bug > Components: scheduler > Reporter: pavan kumar kolamuri > Priority: Blocker > Fix For: 0.9 > > > Ready status was added to workflow status in InstancesResult , which was not valid in case of oozie. We should fix mapping and remove this state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)