我試圖運行wordcount map-reduce示例,請參閱https://support.pivotal.io/hc/en-us/articles/203355837-How-to-run-a-Map-Reduce-jar-using-Oozie-workflow。Oozie map-reduce作業永久卡在PREP狀態
我使用Hadoop 2.2.0在羣集設置
問題是我的Oozie的地圖,減少工作繼續運行。它不會給出任何錯誤,但它沒有成功完成。沒有錯誤消息。也沒有創建輸出目錄(這是假設發生的)。
下面是workflow.xml
<workflow-app xmlns="uri:oozie:workflow:0.1" name="map-reduce-wf">
<start to="mr-node"/>
<action name="mr-node">
<map-reduce>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/hadoop/${examplesRoot}/output-data/${outputDir}"/>
</prepare>
<configuration>
<property>
<name>mapred.mapper.new-api</name>
<value>true</value>
</property>
<property>
<name>mapred.reducer.new-api</name>
<value>true</value>
</property>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>mapreduce.map.class</name>
<value>org.apache.hadoop.examples.WordCount$TokenizerMapper</value>
</property>
<property>
<name>mapreduce.reduce.class</name>
<value>org.apache.hadoop.examples.WordCount$IntSumReducer</value>
</property>
<property>
<name>mapreduce.combine.class</name>
<value>org.apache.hadoop.examples.WordCount$IntSumReducer</value>
</property>
<property>
<name>mapred.output.key.class</name>
<value>org.apache.hadoop.io.Text</value>
</property>
<property>
<name>mapred.output.value.class</name>
<value>org.apache.hadoop.io.IntWritable</value>
</property>
<property>
<name>mapred.input.dir</name>
<value>/user/hadoop/${examplesRoot}/input-data/text</value>
</property>
<property>
<name>mapred.output.dir</name>
<value>/user/hadoop/${examplesRoot}/output-data/${outputDir}</value>
</property>
</configuration>
</map-reduce>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Map/Reduce failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
Job.properties
nameNode=hdfs://hadoopmaster:54310
jobTracker=localhost:54311
queueName=default
examplesRoot=examplesoozie
oozie.wf.application.path=${nameNode}/user/hadoop/${examplesRoot}/map-reduce
outputDir=map-reduce
的作業狀態的輸出是
Workflow Name : map-reduce-wf
App Path : hdfs://hadoopmaster:54310/user/hadoop/examplesoozie/map-reduce
Status : RUNNING
Run : 0
User : hadoopuser
Group : -
Created : 2014-10-26 19:52 GMT
Started : 2014-10-26 19:52 GMT
Last Modified : 2014-10-26 19:52 GMT
Ended : -
CoordAction ID: -
Actions
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Ext Status Err Code
------------------------------------------------------------------------------------------------------------------------------------
[email protected]:start: OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
[email protected] PREP - - -
------------------------------------------------------------------------------------------------------------------------------------
任何幫助將不勝感激。
我看不到在你的workflow.xml中定義的你的mapreduce jar。你能否檢查你是否錯過了jar命令? – 2014-10-27 09:18:17
我的意思是ur文件夾在lib文件夾中?它的類名與workflow.xml中的相同 – 2014-10-27 09:20:35
@KSNidhin:是的,我已經將jar包含在map-reduce文件夾下的lib文件夾中,並且類名是與定義相同。 – abhi70 2014-10-27 21:39:00