[
https://issues.apache.org/jira/browse/OOZIE-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andras Salamon updated OOZIE-3340:
----------------------------------
Description:
The Shell and MultipleShellActions example of the Fluent Job API generates
multiple actions with the same name ({{email-on-error}}) which gives {{E0705}}
error code.
For MultipleShellActions the generated XML:
{noformat}
Workflow job definition generated from API jar:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workflow:workflow-app xmlns:email="uri:oozie:email-action:0.2"
xmlns:workflow="uri:oozie:workflow:1.0"
xmlns:shell="uri:oozie:shell-action:1.0" name="shell-example">
<workflow:start to="parent"/>
<workflow:kill name="kill">
<workflow:message>Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</workflow:message>
</workflow:kill>
<workflow:action name="email-on-error">
<email:email>
<email:to>[email protected]</email:to>
<email:subject>Workflow error</email:subject>
<email:body>Shell action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</email:body>
</email:email>
<workflow:ok to="kill"/>
<workflow:error to="kill"/>
</workflow:action>
<workflow:action name="parent">
...
</workflow:action>
<workflow:decision name="decision1">
...
</workflow:decision>
<workflow:action name="email-on-error">
...
</workflow:action>
<workflow:action name="happy-path-0">
...
</workflow:action>
<workflow:decision name="decision2">
...
</workflow:action>
...
{noformat}
The error message:
{noformat}
bin/oozie job -oozie http://localhost:11000/oozie -runjar fluenttest.jar
-config job.properties -verbose
...
Error: E0705 : E0705: Nnode already defined, node [email-on-error]
{noformat}
The Shell example also creates an XML with multiple {{email-on-error}} actions.
was:
The MultipleShellActions example of the Fluent Job API generates multiple
actions with the same name ({{email-on-error}}) which gives {{E0705}} error
code:
{noformat}Workflow job definition generated from API jar:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workflow:workflow-app xmlns:email="uri:oozie:email-action:0.2"
xmlns:workflow="uri:oozie:workflow:1.0"
xmlns:shell="uri:oozie:shell-action:1.0" name="shell-example">
<workflow:start to="parent"/>
<workflow:kill name="kill">
<workflow:message>Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</workflow:message>
</workflow:kill>
<workflow:action name="email-on-error">
<email:email>
<email:to>[email protected]</email:to>
<email:subject>Workflow error</email:subject>
<email:body>Shell action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</email:body>
</email:email>
<workflow:ok to="kill"/>
<workflow:error to="kill"/>
</workflow:action>
<workflow:action name="parent">
...
</workflow:action>
<workflow:decision name="decision1">
...
</workflow:decision>
<workflow:action name="email-on-error">
...
</workflow:action>
<workflow:action name="happy-path-0">
...
</workflow:action>
<workflow:decision name="decision2">
...
</workflow:action>
...
{noformat}
{noformat}bin/oozie job -oozie http://localhost:11000/oozie -runjar
fluenttest.jar -config job.properties -verbose
...
Error: E0705 : E0705: Nnode already defined, node [email-on-error]
{noformat}
> Fix FluentJob API Shell and MultipleShellActions example
> --------------------------------------------------------
>
> Key: OOZIE-3340
> URL: https://issues.apache.org/jira/browse/OOZIE-3340
> Project: Oozie
> Issue Type: Improvement
> Components: examples
> Reporter: Andras Salamon
> Assignee: Andras Salamon
> Priority: Major
>
> The Shell and MultipleShellActions example of the Fluent Job API generates
> multiple actions with the same name ({{email-on-error}}) which gives
> {{E0705}} error code.
> For MultipleShellActions the generated XML:
> {noformat}
> Workflow job definition generated from API jar:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <workflow:workflow-app xmlns:email="uri:oozie:email-action:0.2"
> xmlns:workflow="uri:oozie:workflow:1.0"
> xmlns:shell="uri:oozie:shell-action:1.0" name="shell-example">
> <workflow:start to="parent"/>
> <workflow:kill name="kill">
> <workflow:message>Action failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</workflow:message>
> </workflow:kill>
> <workflow:action name="email-on-error">
> <email:email>
> <email:to>[email protected]</email:to>
> <email:subject>Workflow error</email:subject>
> <email:body>Shell action failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</email:body>
> </email:email>
> <workflow:ok to="kill"/>
> <workflow:error to="kill"/>
> </workflow:action>
> <workflow:action name="parent">
> ...
> </workflow:action>
> <workflow:decision name="decision1">
> ...
> </workflow:decision>
> <workflow:action name="email-on-error">
> ...
> </workflow:action>
> <workflow:action name="happy-path-0">
> ...
> </workflow:action>
> <workflow:decision name="decision2">
> ...
> </workflow:action>
> ...
> {noformat}
> The error message:
> {noformat}
> bin/oozie job -oozie http://localhost:11000/oozie -runjar fluenttest.jar
> -config job.properties -verbose
> ...
> Error: E0705 : E0705: Nnode already defined, node [email-on-error]
> {noformat}
> The Shell example also creates an XML with multiple {{email-on-error}}
> actions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)