赞
踩
Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
新版本的Hive启动的时候,默认申请的JVM堆内存大小为256M,JVM堆内存申请的太小,导致后期开启本地模式,执行复杂的SQL时经常会报错
因此最好提前调整一下HADOOP_HEAPSIZE这个参数。
(1)修改$HIVE_HOME/conf下的hive-env.sh.template为hive-env.sh
- [atguigu@hadoop102 conf]$ pwd
- /opt/module/hive/conf
-
- [atguigu@hadoop102 conf]$ mv hive-env.sh.template hive-env.sh
(2)将hive-env.sh其中的参数 export HADOOP_HEAPSIZE修改为2048,重启Hive。
修改前
- # The heap size of the jvm stared by hive shell script can be controlled via:
- # export HADOOP_HEAPSIZE=1024
修改后
- # The heap size of the jvm stared by hive shell script can be controlled via:
- export HADOOP_HEAPSIZE=2048
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。