错误的描述
Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
处理过程
1、经过百度,修改了配置文件 yarn-site.xml和mapred-site.xml,
mapred-site.xml, 值是通过 hadoop classpath 取到的
<property>
<name>mapreduce.application.classpath</name>
<value>/app/hadoop/hadoop-3.1.0/etc/hadoop:/app/hadoop/hadoop-3.1.0/share/hadoop/common/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/common/*:/app/hadoop/hadoop-3.1.0/share/hadoop/hd
fs:/app/hadoop/hadoop-3.1.0/share/hadoop/hdfs/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/hdfs/*:/app/hadoop/hadoop-3.1.0/share/hadoop/mapreduce/*:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn
:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn/*</value>
</property>
yarn-site.xml,值是通过 hadoop classpath 取到的
<property>
<name>yarn.application.classpath</name>
<value>/app/hadoop/hadoop-3.1.0/etc/hadoop:/app/hadoop/hadoop-3.1.0/share/hadoop/common/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/common/*:/app/hadoop/hadoop-3.1.0/share/hadoop/hd
fs:/app/hadoop/hadoop-3.1.0/share/hadoop/hdfs/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/hdfs/*:/app/hadoop/hadoop-3.1.0/share/hadoop/mapreduce/*:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn
:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn/lib/*:/app/hadoop/hadoop-3.1.0/share/hadoop/yarn/*</value>
</property>
2、我改了上面配置后,并不能解决报错, 我做了下面的步骤
校验一下 Hive的版本和hadoop版本,比如:
hive3.1.2要和hadoop3.1.0版本对应
3、然后重启hdfs/yarn,然后就不错了
题外话
如果你的环境是虚拟机的话,你需要设置一下map的内存限制,否则会报错
<property>
<name>mapreduce.map.memory.mb</name>
<value>1536</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx1024M</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>2000</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx1560M</value>
</property>
|