[
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:22 AM:
------------------------------------------------------------------------
Ajay Yadava:
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.
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)