Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 12-18-2015 04:47 PM
Hi,
I am trying to submit Oozie workflow with distcp-action but getting below error when I validate the workflow
oozie validate pdr-distcp-wf.xml Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 20; cvc-complex-type.2.4.a: Invalid content was found starting with element 'configuration'. One of '{"uri:oozie:distcp-action:0.2":arg}' is expected.
Please find the workflow that I am using below....
<workflow-app xmlns="uri:oozie:workflow:0.2" name="pdr-distcp-wf">
<start to="distcp-node"/>
<action name="distcp-node">
<distcp xmlns="uri:oozie:distcp-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode1}</name-node>
<arg>${SourceDir}</arg>
<arg>${TargetDir}</arg>
<configuration>
<property>
<name>oozie.launcher.mapreduce.job.hdfs-servers</name>
<value>${nameNode1},${nameNode2}</value>
</property>
</configuration>
</distcp>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>Please help me out
Created 12-29-2015 04:21 PM
try to replace your workflow with this and then plugin your values
https://github.com/apache/oozie/blob/master/examples/src/main/apps/distcp/workflow.xml
Created 01-15-2016 04:32 PM
@Venkata Sridhar Gangavarapu you're welcome, please choose the answer that was most relevant and mark as accepted.
Created 01-29-2016 07:26 AM
Hi Venkat,
The problem is here you declared args parameter before the configuration you should declare the args after the configuration it won't give you an error. I tested it it's working fine.
<workflow-app xmlns="uri:oozie:workflow:0.2" name="pdr-distcp-wf">
<start to="distcp-node"/>
<action name="distcp-node">
<distcp xmlns="uri:oozie:distcp-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode1}</name-node>
<configuration>
<property>
<name>oozie.launcher.mapreduce.job.hdfs-servers</name>
<value>${nameNode1},${nameNode2}</value>
</property>
</configuration>
<arg>${SourceDir}</arg>
<arg>${TargetDir}</arg>
</distcp>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>