HiveSqlBug :return code 1&No cluster diagnostics found&return code -101

本文详细分析了Hive SQL在执行过程中遇到的return code 1和-101错误,涉及文件格式不匹配、并发操作、动态分区等问题,并提供了相应的解决方案,包括检查数据格式一致性、处理并发锁表情况以及调整Hive配置参数。
摘要由CSDN通过智能技术生成

code 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=*********************************

这种报错可能出现在insert select中,也可能直接load中报错出现,对于tez引擎和mr引擎,这个报错可能会有不同的原因 需要读者自行分辨

  • 文件格式与要插入的数据格式不同 ,csv与text
  • 表有其他的进程在占用,会导致select出结果但最终结果load步骤报错
  • 分区字段为空或中文字段,总之分区字段报错导致落地的hdfs分区目录会有问题

code [2] exit(2)

org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. No cluster diagnostics found.

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]

这种报错有可能是锁表,例如hive3中有事务,一读一写就会有这种问题

code1 MoveTask

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Exception updating metastore for acid table database.table1 with partitions
这个一般是动态分区时报的错,或者传参过多导致的

解决方案:
hive.direct.sql.max.elements.values.clause=200
hive.direct.sql.max.elements.in.clause=200

Ensure called on an unitialized

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

解决办法:频繁登录导致的session错乱,注销hue 等待一段时间 重新登录。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Direction_Wind

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值