首页 > 解决方案 > 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>

标签: hadoophivemapreducehadoop-yarn

解决方案


export YARN_HOME=$HADOOP_HOME      

在 bashrc 中为我工作


推荐阅读