hadoop3.2.0配置与错误记录

2022/2/11 23:43:00

本文主要是介绍hadoop3.2.0配置与错误记录,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

详细配置还是得看官网:https://hadoop.apache.org/docs/r3.2.0/hadoop-project-dist/hadoop-common/SingleCluster.html#Pseudo-Distributed_Operation

我配置的是单节点,伪分布式

运行实例wordcount报错

Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

解决方法:

跟着官网的配置,在etc/hadoop/mapred-site.xml中加入配置

<configuration>
    <property>
        <name>mapreduce.application.classpath</name>
        <value>$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*:$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*</value>
    </property>
</configuration>
注意自己的环境变量的配置,就可成功运行
bin/yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.0.jar wordcount /input /output

 



这篇关于hadoop3.2.0配置与错误记录的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程