hive设置本地模式插入数据时产生的错误

 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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]:Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Exception when loading 1 in table uniaction1 with loadPath=********************************* 。 引用\[2\]:Error while processing statement: FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Ensure called on an unitialized (or closed) session 352a2d91-16c8-44bd-a296-8a8eab91a2d0 。 引用\[3\]:ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask INFO : Completed executing command(queryId=hive_20221018074224_172b6c79-9a2b-4af0-a992-b6db1380daf2); Time taken: 5.112 seconds Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask (state=08S01,code=1) Intercepting System.exit(2) Failing Oozie Launcher, Main class \[org.apache.oozie.action.hadoop.Hive2Main\], exit code \[2\] 。 问题: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 回答: 根据提供的引用内容,没有找到关于"Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask"的具体信息。请提供更多的上下文或详细描述,以便我能够更好地回答您的问题。 #### 引用[.reference_title] - *1* *2* *3* [hive报错信息不明确的情况汇总](https://blog.csdn.net/Direction_Wind/article/details/126001680)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值