Hadoop伪分布式下——Hadoop2.x运行自带的WordCount报错Container exited with a non-zero exit code 1.
问题
今天,基于Hadoop2.5.0搭建了Hadoop集群,但是在运行下面命令后报错
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar wordcount /input /output1
伪分布式模式配置文件
mapred-site.xml 配置如下 :
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.application.classpath</name>
<value>/opt/app/hadoop-2.5.0/share/hadoop/mapreduce/lib/*</value>
</property>
</configuration>
yarn-site.xml 配置如下 :
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
解决方法
mapred-site.xml 配置中去掉 mapreduce.application.classpath 配置:
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>