Reputation: 303
I'm trying to execute MapReduce job using oozie workflow in hue. When I submit the job, oozie successfully executes but I don't get the expected output. It seems that either mapper or reducer never invoked.here is my workflow.xml:
<workflow-app name="wordCount" xmlns="uri:oozie:workflow:0.4">
<start to="wordcount"/>
<action name="wordcount">
<map-reduce>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.input.dir</name>
<value>/user/root/jane/inputPath</value>
</property>
<property>
<name>mapred.output.dir</name>
<value>/user/root/jane/outputPath17</value>
</property>
<property>
<name>mapred.mapper.class</name>
<value>MapReduceGenerateReports.Map</value>
</property>
<property>
<name>mapred.reducer.class</name>
<value>MapReduceGenerateReports.Reduce</value>
</property>
<property>
<name>mapred.mapper.new-api</name>
<value>true</value>
</property>
<property>
<name>mapred.reducer.new-api</name>
<value>true</value>
</property>
</configuration>
</map-reduce>
<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>
Can anyone please tell what is the problem?
my new workflow.xml :
<workflow-app name="wordCount" xmlns="uri:oozie:workflow:0.4">
<start to="wordcount"/>
<action name="wordcount">
<map-reduce>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.input.dir</name>
<value>/user/root/jane/inputPath</value>
</property>
<property>
<name>mapred.output.dir</name>
<value>/user/root/jane/outputPath3</value>
</property>
<property>
<name>mapred.mapper.new-api</name>
<value>true</value>
</property>
<property>
<name>mapred.reducer.new-api</name>
<value>true</value>
</property>
<property>
<name>mapreduce.map.class</name>
<value>MapReduceGenerateReports$Map</value>
</property>
<property>
<name>mapreduce.reduce.class</name>
<value>MapReduceGenerateReports$Reduce</value>
</property>
<property>
<name> mapred.output.key.class</name>
<value>org.apache.hadoop.io.LongWritable</value>
</property>
<property>
<name>mapred.output.value.class</name>
<value>org.apache.hadoop.io.Text</value>
</property>
</configuration>
</map-reduce>
<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>
jobtracker log:
1)
Kind % Complete Num Tasks Pending Running Complete Killed Failed/Killed
Task Attempts
map 100.00%
1 0 0 1 0 0 / 0
reduce 100.00%
0 0 0 0 0 0 / 0
2)
Kind Total Tasks(successful+failed+killed) Successful tasks Failed tasks Killed tasks Start Time Finish Time
Setup 1 1 0 0 5-Apr-2014 18:36:22 5-Apr-2014 18:36:23 (1sec)
Map 1 1 0 0 5-Apr-2014 18:33:27 5-Apr-2014 18:33:33 (5sec)
Reduce 0 0 0 0
Cleanup 1 1 0 0 5-Apr-2014 18:33:33 5-Apr-2014 18:33:37 (4sec)
Upvotes: 0
Views: 4306
Reputation: 10941
Check out the instructions for using the new API here
However, if you really need to run MapReduce jobs written using the 20 API in Oozie, below are the changes you need to make in workflow.xml.
- change mapred.mapper.class to mapreduce.map.class
- change mapred.reducer.class to mapreduce.reduce.class
- add mapred.output.key.class
- add mapred.output.value.class
- and, include the following property into MR action configuration
Upvotes: 2