Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

1.在目录:/export/server/hadoop-3.1.4/etc/hadoop 下修改文件:hadoop-env.sh 

export HADOOP_CLIENT_OPTS="-Xmx2048m $HADOOP_CLIENT_OPTS"

分发给各个主机:scp hadoop-env.sh node2:$PWD

2.在安装hive的主机上,在目录:/export/server/hive-3.1.2/bin 下修改 hive-config.sh

export HADOOP_HEAPSIZE=${HADOOP_HEAPSIZE:-2048}  默认为256太小

关闭hive的 RunJar

3.关闭重启hadoop   全部关闭stop-all.sh   启动start-all.sh

启动hive即可

posted @ 2022-06-05 17:43  景、  阅读(194)  评论(0编辑  收藏  举报