人生到头来,就是不断放下,但永远最令人心痛的就是|

durtime

园龄:4年8个月粉丝:10关注:1

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

 

本文作者:durtime

本文链接:https://www.cnblogs.com/durtime/p/15884995.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   durtime  阅读(113)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
展开