hadoop - YARN 无法找到或加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster
问题描述
我的查询:我已经在 ubantu 上安装了 hive。我之前测试过它是工作文件,但后来它开始给出错误。
插入 test2 值(1,'Mahendra');
我的蜂巢错误:
Query ID = mahendra_20180827145546_86973630-5eff-4764-ade8-cfc3a8ce5c37
Total jobs = 3
Launching Job 1 out of 3
在编译时确定的 reduce 任务数:1
为了更改 reducer 的平均负载(以字节为单位):
设置 hive。 exec.reducers.bytes.per.reducer=
为了限制reducer 的最大数量:set hive.exec.reducers.max= 为了设置一个恒定的reducer 数量:set mapreduce.job.reduces= 开始Job = job_1535360274908_0006 , 跟踪 URL = http://mahendra-system:8088/proxy/application_1535360274908_0006/ Kill Command = /home/mahendra/HDEcho/hadoop-3.0.3/bin/mapred job -kill job_1535360274908_0006
Stage-1 的 Hadoop 作业信息:映射器数量:0;减速器数量:0
2018-08-27 14:55:51,645 Stage-1 map = 0%, reduce = 0% Ended Job = job_1535360274908_0006 with errors 作业期间出错,获取调试信息...
FAILED:执行错误,返回码来自 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 的 2 已启动 MapReduce 作业:
Stage-Stage-1:HDFS 读取:0 HDFS 写入:0 FAIL MapReduce CPU 总时间花费:0 毫秒
我的纱线错误:
错误:无法找到或加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster
我的诊断:
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:
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
我的 MapRed-site.xml :
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.application.classpath</name>
<value>/home/mahendra/HDEcho/hadoop-3.0.3/share/hadoop/mapreduce/*:/home/mahendra/HDEcho/hadoop-3.0.3/share/hadoop/mapreduce/lib/*</value>
</property>
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=/home/mahendra/HDEcho/hadoop-3.0.3</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=/home/mahendra/HDEcho/hadoop-3.0.3</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=/home/mahendra/HDEcho/hadoop-3.0.3</value>
</property>
</configuration>
解决方案
export YARN_HOME=$HADOOP_HOME
在 bashrc 中为我工作
推荐阅读
- c - 在这个 git repo 中运行 ./Makefile 会导致错误
- javascript - React-Native Redux 初始状态值为新减速器返回“未定义”?
- python - 求解数字平方根的巴比伦方法
- java - 从arrayList索引访问类字段?
- python - 在 scapy 中使用方括号作为数据包标头
- r - 是否可以在 R(或类似)中初始化窗口调整大小回调函数?
- python - 如何检测 asyncio.StreamWriter.write 上的关闭套接字?
- python - 在树形图中显示框的大小(方形)
- javascript - 使用 React Native 和 Redux 定期下载和显示网络驱动的数据
- hyperledger-fabric - 无法在 Windows 上的 Hyperledger Fabric 中运行 fabcar 示例