栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

hadoop集群测试 Wordcount报错

hadoop集群测试 Wordcount报错

在使用wordcount时,突然报错:

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

Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:

  yarn.app.mapreduce.am.env
  HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}


  mapreduce.map.env
  HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}


  mapreduce.reduce.env
  HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}



经过搜索后,需要在yarn-site.xml中添加classpath信息。
先查到Hadoop的classpath:

hadoop classpath

复制内容,很长的一串。
然后打开自己安装的Hadoop目录下的yarn-site.xml,位置在 Hadoop目录/etc/hadoop/yarn-site.xml.
在configuration标签中,加入以下代码块

  
    yarn.application.classpath
    复制的Hadoop classpath信息
  

加入后,记得分发到集群中的其他服务器上

然后在你配置了 ResourceManager 的节点的机器上关闭 YARN并重新启动即可。

sbin/stop-yarn.sh
sbin/start-yarn.sh
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/745433.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号