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

Posted code never lies

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop 3.1.1 Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster相关的知识,希望对你有一定的参考价值。

启动hdfs后执行share目录中自带的mapreduce程序时报如下错误

 

找到$HADOOP_HOME/etc/mapred-site.xml,增加以下配置

 1 <property>
 2   <name>yarn.app.mapreduce.am.env</name>
 3   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
 4 </property>
 5 <property>
 6   <name>mapreduce.map.env</name>
 7   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
 8 </property>
 9 <property>
10   <name>mapreduce.reduce.env</name>
11   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
12 </property>

 

以上是关于hadoop 3.1.1 Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster的主要内容,如果未能解决你的问题,请参考以下文章

hadoop Error: JAVA_HOME is not set and could not be found.

Hadoop启动报Error: JAVA_HOME is not set and could not be found解决办法

Got fatal error 1236 from master when reading data from binary log: 'Could not find first log fi

hadoop启动报错:localhost: ssh: Could not resolve hostname localhost

启动hadoop时出现ERROR: JAVA_HOME is not set and could not be found.解决办法

Could not locate executable nullinwinutils.exe in the Hadoop binaries