I have a requirement that, I need to take the date from coordinator to workflow in oozie.
For that I have developed sample coordinator and work flowas following. But, after launching coordinator job, all workflow jobs are failing with error code E0701. Means xml parsing error. I tried very hardly, where I am doing wrong? I couldn't find out the issue? please help.
workflow.xml
<workflow-app name="test_wf" xmlns="uri:oozie:workflow:0.4">
<start to="samp_pig"/>
<action name="samp_pig">
<fs>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<delete path='${nameNode}/tmp/${wf.conf("DATE")}'/>
</fs>
<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>
coordinator.xml
<coordinator-app name="test"
frequency="5"
start="2014-07-15T11:35Z" end="2014-07-17T12:15Z" timezone="America/Los_Angeles"
xmlns="uri:oozie:coordinator:0.2">
<action>
<workflow>
<app-path>${wf_application_path}</app-path>
<configuration>
<property>
<name>DATE</name>
<value>${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}</value>
</property>
</configuration>
</workflow>
</action>
job.properties
jobTracker=localhost.localdomain:8021
nameNode=hdfs://localhost.localdomain:8020
oozie.coord.application.path=/tmp/uc1/
oozie.use.system.libpath=true
wf_application_path=/tmp/uc1/wf1/
commands using
hadoop fs -rmr /tmp/uc1/
hadoop fs -mkdir /tmp/uc1/wf1/
hadoop fs -put * /tmp/uc1/wf1/
hadoop fs -put * /tmp/uc1/
oozie job -oozie http://localhost.localdomain:11000/oozie -config job.properties -submit
I found my mistake. We should not use
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
inside "fs" action. Remaining everything as is. Even coordinator working fine.