Hadoop3.2.0的mapred-site.xml配置(3.X以后的都要这么配)


**修改mapred-site.xml,配置使用yarn框架执行mapreduce处理程序,与之前版本多了后面两部**
**不配置mapreduce.application.classpath这个参数mapreduce运行时会报错:**
**Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster**

<configuration>
        <property>
                <name>mapreduce.framework.name</name>
                <value>yarn</value>
        </property>
        <property>
                <name>mapreduce.application.classpath</name>
                <value>
                        /data/soft/hadoop-3.2.0/etc/hadoop,
                        /data/soft/hadoop-3.2.0/share/hadoop/common/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/common/lib/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/hdfs/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/hdfs/lib/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/mapreduce/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/mapreduce/lib/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/yarn/*,
                        /data/soft/hadoop-3.2.0/share/hadoop/yarn/lib/*
                </value>
        </property>

</configuration>

解决方案出自这个博客内容
还有这篇博客

posted @ 2021-02-06 00:22  yucreator  阅读(1208)  评论(0编辑  收藏  举报