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 12-24-2015 01:58 AM
you forgot to close the discp action with </distcp>
<distcp xmlns="uri:oozie:distcp-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode1}</name-node>
<arg>${nameNode1}/path/to/input.txt</arg>
<arg>${nameNode2}/path/to/output.txt</arg>
</distcp>
Created 12-24-2015 06:14 PM
I closed it.
You can see it below to </configuration>
Created 12-24-2015 06:19 PM
@Venkata Sridhar Gangavarapu I did not say close configuration block, you did not close distcp block
<distcpxmlns="uri:oozie:distcp-action:0.2">
</distcp>
Created 12-29-2015 03:54 PM
Okay...Below is my workflow where I have the distcp block closed as well
<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>
I still get the same error
Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 19; 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.
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 12-29-2015 07:10 PM
I changed the workflow as you suggested
<workflow-app xmlns="uri:oozie:workflow:0.3" name="pdr-distcp-wf"> <start to="distcp-node"/> <action name="distcp-node"> <distcp xmlns="uri:oozie:distcp-action:0.1"> <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> <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>
But still the same error
Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 19; cvc-complex-type.2.4.a: Invalid content was found starting with element 'configuration'. One of '{"uri:oozie:distcp-action:0.1":arg}' is expected
Created 01-05-2016 03:36 PM
I did as you said. Below is the changed workflow.
<workflow-app xmlns="uri:oozie:workflow:0.3" name="pdr-distcp-wf"> <start to="distcp-node"/> <action name="distcp-node"> <distcp xmlns="uri:oozie:distcp-action:0.1"> <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> <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>
I still see the below error
Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 19; cvc-complex-type.2.4.a: Invalid content was found starting with element 'configuration'. One of '{"uri:oozie:distcp-action:0.1":arg}' is expected.
Please advice
Thanks,
Venkat
Created 01-15-2016 02:08 PM
In the example from the oozie github, all of the <arg> parameters are after the <configuration> section. In your latest example, you have <arg> statements on both sides of the <configuration> block. Try moving all of your <arg>s to after the <configuration> block. It seems to be expecting the <configuration> block before any <arg> statements.
Created 01-15-2016 04:31 PM
Hey Emaxwell,
You are correct. The args should be after the configuration block is closed. The workflow is valid now
Artem Ervits: Thank you so much for your help on this.
The issue is resolved..!!