1. 程式人生 > >hadoop 3.1.1 Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

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

name ado org 3.1.1 div 9.png per mapred 技術分享

啟動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