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】风流不在谈锋胜,袖手无言味最长。这篇文章主要讲述hadoop 3.1.1 Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster相关的知识,希望能为你提供帮助。
启动hdfs后执行share目录中自带的mapreduce程序时报如下错误

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

文章图片

 
找到$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

文章图片

 

    推荐阅读