欢迎访问鸿雪径软件工作室,这里介绍软件工作室的相关技术产品、动态以及鸿雪径杂谈,如有技术合作请与工作室联系!邮费网 易食烤吧 特产大全网
首页 > Linux/Unix > Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

发布时间:2018-08-23 作者: 点击:306

提交懂到hadoop的任务总是报:Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

经过检查发现,在日志中有明确的提示:

Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:

<property>

<name>yarn.app.mapreduce.am.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>

<property>

<name>mapreduce.map.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>

<property>

<name>mapreduce.reduce.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>


需要在mapred-site.xml中增加

<property>

<name>yarn.app.mapreduce.am.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>

<property>

<name>mapreduce.map.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>

<property>

<name>mapreduce.reduce.env</name>

<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>

</property>


增加后重启yarn的resourcemanager和nodemanager,任务就可以正常运行了。

更多关于 hadoop,mapreduce 的信息
本站部分文章转载于网上,版权归原作者所有。如果侵犯您的权益,请Email和本站联系!
鸿雪径 www.HongXueJing.com  冀ICP备07017673号-4