You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Andras Piros (JIRA)" <ji...@apache.org> on 2018/11/29 09:42:00 UTC

[jira] [Comment Edited] (OOZIE-3350) Forkjoin validation does not fail if a node is reachable from two different forks

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

Andras Piros edited comment on OOZIE-3350 at 11/29/18 9:41 AM:
---------------------------------------------------------------

[~pbacsko] the current {{LiteWorkflowValidator#validateForkJoin()}} works well for either nested {{<decision/>}} nodes and their implicitly joining {{<action/>}} nodes, or nested {{<fork/>}} and {{<join/>}} instances, but not for cases when those scenarios are mixed. Here the main problem is the state is stored in multiple inout parameters like {{nodeAndDecisionParents}}, {{forkJoins}}, {{path}}, and {{topDecisionParent}} - those pieces are independent from each other and not considered as a whole, hence those errors.

[~kmarton] the first step would be to have decent amount of unit testing covering the bulk of {{LiteWorkflowValidator}}, introducing unit tests also for such mixed cases. Next thing would be to reimplement {{validateForkJoin()}} with a state object where fields are interconnected and all possible state transition dependencies are handled correctly. I suggest to use the State pattern for that purpose.


was (Author: andras.piros):
[~pbacsko] the current {{LiteWorkflowValidator#validateForkJoin()}} works well for either nested {{<decision/>}} nodes and their implicitly joining {{<action/>}} nodes, or nested {{<fork/>}}s and {{<join/>}}s, but not for cases when those scenarios are mixed. Here the main problem is the state is stored in multiple inout parameters like {{nodeAndDecisionParents}}, {{forkJoins}}, {{path}}, and {{topDecisionParent}} - those pieces are independent from each other and not considered as a whole, hence those errors.

[~kmarton] the first step would be to have decent amount of unit testing covering the bulk of {{LiteWorkflowValidator}}, introducing unit tests also for such mixed cases. Next thing would be to reimplement {{validateForkJoin()}} with a state object where fields are interconnected and all possible state transition dependencies are handled correctly. I suggest to use the State pattern for that purpose.

> Forkjoin validation does not fail if a node is reachable from two different forks
> ---------------------------------------------------------------------------------
>
>                 Key: OOZIE-3350
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3350
>             Project: Oozie
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.3.1
>            Reporter: wang jinyin
>            Assignee: Julia Kinga Marton
>            Priority: Major
>             Fix For: trunk
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> when "multiple ok to same node" under decision node, forkjoin validation error.
>  
> such as below example, 'action_C' and 'action_D' both transition to 'action_E'.
> But, because they are under same topDecisionParent 'decision_A', validator will not throw any exception. 
>  
> {quote}<decision name = 'decision_A'>
>     <case to = 'fork_B'></case>
>     <case to = 'action_G'></case>
> </decision>
> <fork name = 'fork_B'>
>     <path start = 'action_C'/>
>     <path start = 'action_D'/>
> </fork>
> <action name = 'action_C'>
>     <ok to = 'action_E'>
>     <error to = 'kill'>
> </action>
> <action name = 'action_D'>
>     <ok to = 'action_E'>
>     <error to = 'kill'>
> </action>
> <action name = 'action_E'>
>     <ok to = 'join_F'>
>     <error to = 'kill'>
> </action>
> <join name = 'join_F'>
>     <ok to = 'action_H'>
>     <error to = 'kill'>
> </join>
> <action name = 'action_G'>
>     <ok to = 'action_H'>
>     <error to = 'kill'>
> </action>
> <action name = 'action_H'>
>     <ok to = 'end'>
>     <error to = 'kill'>
> </action>
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)