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

Denes Bodo commented on OOZIE-3561:
-----------------------------------

I managed to reproduce the issue by using only unit tests:
 # Create a workflow with similar content:
{noformat}
<workflow-app xmlns="uri:oozie:workflow:0.5" name="test-wf">
    <start to="a1"/>

    <action name="a1"><fs><mkdir path='/tmp'/></fs><ok to="a2"/><error 
to="a2"/></action>
    <action name="a2"><fs><mkdir path='/tmp'/></fs><ok to="a3"/><error 
to="a3"/></action>
    <action name="a3"><fs><mkdir path='/tmp'/></fs><ok to="z"/><error 
to="z"/></action>

    <end name="z"/>
</workflow-app>
{noformat}
 # create a test like:
{code:java}
    public void test40ActionsInARow() throws WorkflowException, IOException {
        LiteWorkflowAppParser parser = newLiteWorkflowAppParser();
        try {

            parser.validateAndParse(IOUtils.getResourceAsReader(
                    "wf-actions-40.xml", -1), new Configuration());
        } catch (final WorkflowException e) {
            e.printStackTrace();
            Assert.fail("This workflow has to be correct.");
        }
    }
{code}

With 40 actions, the check couldn't finish within 10 minutes.

> Forkjoin validation is slow when there are many actions in chain
> ----------------------------------------------------------------
>
>                 Key: OOZIE-3561
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3561
>             Project: Oozie
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.1.0
>            Reporter: Denes Bodo
>            Assignee: Denes Bodo
>            Priority: Critical
>              Labels: performance
>
> In case we have a workflow which has, let's say, 80 actions after each other:
> {{a1 -> a2 -> ... a80}}
> then the validator code "never" finishes.
> Currently the validation (in my understanding) does depth first checks from 
> the start node and runs in time of n! . This is confirmed as when we split 
> this huge workflow into two 40-element workflow then we get 2x ~40!-step in 
> validation instead of ~80! steps.
> Guys, could you please confirm or disprove my theory?
> Thanks



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to