当前位置:   article > 正文

hive设置本地模式插入数据时产生的错误_error while processing statement: failed: executio

error while processing statement: failed: execution error, return code 2 fro

 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

  1. [atguigu@hadoop102 conf]$ pwd
  2. /opt/module/hive/conf
  3. [atguigu@hadoop102 conf]$ mv hive-env.sh.template hive-env.sh

(2)将hive-env.sh其中的参数 export HADOOP_HEAPSIZE修改为2048,重启Hive

修改前

  1. # The heap size of the jvm stared by hive shell script can be controlled via:
  2. # export HADOOP_HEAPSIZE=1024

修改后

  1. # The heap size of the jvm stared by hive shell script can be controlled via:
  2. export HADOOP_HEAPSIZE=2048

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/728455
推荐阅读
相关标签
  

闽ICP备14008679号