Reputation: 81
I am attempting to run a simple Oozie job to pull data from a local MySQL database using Sqoop. Below is my workflow.xml:
<workflow-app name="sqoopoozietest" xmlns="uri:oozie:workflow:0.1">
<start to="sqoopconnect"/>
<action name="sqoopconnect">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>horton-n2.hdp.local:8050</job-tracker>
<name-node>hdfs://horton-n1.hdp.local:8020</name-node>
<prepare>
<delete path="hdfs://horton-n1.hdp.local:8020/user/mannb/sqoopoozie/sqoopinput"/>
</prepare>
<configuration>
<property>
<name>mapred.compress.map.output</name>
<value>true</value>
</property>
</configuration>
<command>import --connect jdbc:mysql://horton-n1.hdp.local/sqooptest --table sampledata --username sqoop --password sqoop123 --target-dir --driver com.mysql.jdbc.Driver hdfs://horton-n1.hdp.local:8020/user/mannb/sqoopoozie/sqoopinput -m 1</command>
</sqoop>
<ok to = "sqoopend"/>
<error to = "kill"/>
</action>
<kill name = "kill">
<message>"Workflow failed."</message>
</kill>
<end name = "sqoopend" />
</workflow-app>
The main error I'm receiving an error from /var/log/oozie.log:
javax.servlet.jsp.el.ELException: The function "wf:errorMessage" requires 1 arguments but was passed 0
I thought this was strange since I am passing an argument to the kill name message: "Workflow failed.".
Below is my job.properties file:
nameNode=hdfs://horton-n1.hdp.local:8020
jobTracker=horton-n2.hdp.local:8050
queueName=default
#oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/mannb/sqoopoozie/workflow.xml
Any help is greatly appreciated.
Upvotes: 1
Views: 1282
Reputation: 2089
Change your code as below.
<error to = "kill_job"/>
<kill name = "kill_job">
<message>Workflow failed</message>
</kill>
Upvotes: 1