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 on 07-06-2015 10:17 AM - edited 09-16-2022 02:33 AM
Pig and Oozie
job.properties
nameNode=hdfs://localhost:8020
jobTracker=localhost:8032
queueName=default
oozie.libpath=/oozie/lib
oozie.wf.application.path=${nameNode}/oozie
workflow.xml
<workflow-app name='pig-wf' xmlns="uri:oozie:workflow:0.3">
<start to='pig-node'/>
<action name='pig-node'>
<pig>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare> <delete path="${nameNode}/oozie/pig/out"/></prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<script>script.pig</script>
</pig>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Pig failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
script.pig
A = LOAD 'data.csv';
store A into 'oozie_out';
Folder Structure:
[cloudera@quickstart oozie]$ hdfs dfs -ls /oozie
Found 5 items
-rw-r--r-- 1 oozie supergroup 29 2015-07-05 10:55 /oozie/data.csv
drwxr-xr-x - oozie supergroup 0 2015-07-05 10:55 /oozie/lib
-rw-r--r-- 1 oozie supergroup 148 2015-07-05 10:55 /oozie/pig.properties
-rw-r--r-- 1 oozie supergroup 48 2015-07-05 10:55 /oozie/script.pig
-rw-r--r-- 1 oozie supergroup 848 2015-07-05 10:55 /oozie/workflow.xml
libfolder
[cloudera@quickstart oozie]$ hdfs dfs -ls /oozie/lib
Found 7 items
-rw-r--r-- 1 oozie supergroup 338540 2015-07-05 10:55 /oozie/lib/datafu-1.1.0-cdh5.4.0.jar
-rw-r--r-- 1 oozie supergroup 338540 2015-07-05 10:55 /oozie/lib/datafu.jar
-rw-r--r-- 1 oozie supergroup 9741 2015-07-05 10:55 /oozie/lib/pig-0.12.0-cdh5.4.0-smoketests.jar
-rw-r--r-- 1 oozie supergroup 8377412 2015-07-05 10:55 /oozie/lib/pig-0.12.0-cdh5.4.0-withouthadoop.jar
-rw-r--r-- 1 oozie supergroup 24380084 2015-07-05 10:55 /oozie/lib/pig-0.12.0-cdh5.4.0.jar
-rw-r--r-- 1 oozie supergroup 8377412 2015-07-05 10:55 /oozie/lib/pig.jar
-rw-r--r-- 1 oozie supergroup 378081 2015-07-05 10:55 /oozie/lib/piggybank.jar
Cloudera VM : 5.4.0
Extra Info : Oozie works fine with MR Jobs.
Can you please help me to resolve the issue?
Thanks,
Sree
Created 07-08-2015 09:57 PM
Created 07-06-2015 11:12 AM
Created 07-07-2015 05:58 AM
What is the error now? I can't see any.
Created 07-07-2015 08:27 AM
Thank you for looking into the issue.
When I run the job is KILLED aftersometime by oozie. In the log ERROR, reason: Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
2015-07-06 11:08:25,314 WARN PigActionExecutor:523 - SERVER[quickstart.cloudera] USER[cloudera] GROUP[-] TOKEN[] APP[pig-wf] JOB[0000001-150706100519676-oozie-oozi-W] ACTION[0000001-150706100519676-oozie-oozi-W@pig-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
2015-07-06 11:08:25,528 INFO ActionEndXCommand:520 - SERVER[quickstart.cloudera] USER[cloudera] GROUP[-] TOKEN[] APP[pig-wf] JOB[0000001-150706100519676-oozie-oozi-W] ACTION[0000001-150706100519676-oozie-oozi-W@pig-node] ERROR is considered as FAILED for SLA
2015-07-06 11:08:25,644 INFO ActionStartXCommand:520 - SERVER[quickstart.cloudera] USER[cloudera] GROUP[-] TOKEN[] APP[pig-wf] JOB[0000001-150706100519676-oozie-oozi-W] ACTION[0000001-150706100519676-oozie-oozi-W@fail] Start action [0000001-150706100519676-oozie-oozi-W@fail] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
Created 07-08-2015 09:57 PM