在执行脚本:
create table liuchengtmp1_%CHINDAASDATE% as select a.markcode, a.xiangmu, case when instrfun(xiangmu,'已注册(') >0 THEN '已注册' when instrfun(xiangmu,'初步审定(') >0 THEN '初步审定' ELSE XIANGMU END XIANGMU_new from f_tm_process_hdfs_ext_%CHINDAASDATE% a join ( select max(fliuc_id) fliucid1 from f_tm_process_hdfs_ext_%CHINDAASDATE% a join (select a.markcode,max(a.liuchengdate) maxliuchendate,max(a.fliuc_idt) maxfliucidt from f_tm_process_hdfs_ext_%CHINDAASDATE% a join (select markcode, max(liuchengdate) maxliuchendate from f_tm_process_hdfs_ext_%CHINDAASDATE% group by markcode) b on a.markcode = b.markcode and a.liuchengdate = b.maxliuchendate group by a.markcode) c on a.markcode = c.markcode and a.liuchengdate = c.maxliuchendate and a.fliuc_idt = c.maxfliucidt group by a.markcode; ) e on (a.fliuc_id = e.fliucid1);
脚本分拆成12个mr任务,在执行到第5个mr任务的时候报错如下:
网上找了好多资料,有的说这不是个错,有的说是内存不够造成,看上面报错截图,内存使用一直在增加,
因此估计是内存不够了,
后来处理措施为,将上述语句拆分成2步来执行,中间有一次数据落地,这样防止将所有数据都放在内存中执行,如下:
drop table if exists liuchengtmp_%CHINDAASDATE%; create table liuchengtmp_%CHINDAASDATE% as select max(fliuc_id) fliucid1 from f_tm_process_hdfs_ext_%CHINDAASDATE% a join (select a.markcode,max(a.liuchengdate) maxliuchendate,max(a.fliuc_idt) maxfliucidt from f_tm_process_hdfs_ext_%CHINDAASDATE% a join (select markcode, max(liuchengdate) maxliuchendate from f_tm_process_hdfs_ext_%CHINDAASDATE% group by markcode) b on a.markcode = b.markcode and a.liuchengdate = b.maxliuchendate group by a.markcode) c on a.markcode = c.markcode and a.liuchengdate = c.maxliuchendate and a.fliuc_idt = c.maxfliucidt group by a.markcode; drop table if exists liuchengtmp1_%CHINDAASDATE%; create table liuchengtmp1_%CHINDAASDATE% as select a.markcode, a.xiangmu, case when instrfun(xiangmu,'已注册(') >0 THEN '已注册' when instrfun(xiangmu,'初步审定(') >0 THEN '初步审定' ELSE XIANGMU END XIANGMU_new from f_tm_process_hdfs_ext_%CHINDAASDATE% a join liuchengtmp_%CHINDAASDATE% b on (a.fliuc_id = b.fliucid1);
修改后,执行,不在报错
下面是参考链接,值得看看老外们的说法:
相关推荐
Hive错误之 Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask错误分析_xiaohu21的博客-CSDN博客.mht
ERROR : FAILED: Execution Error, return code 30041 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. 前言报错信息异常分析配置改动后记 前言 在成功消除Cloudare管理界面上那些可恶的警告之后,我又对yarn...
url = "jdbc:hive2://111.11.11.11:10000/ods_wjw" driver = "org.apache.hive.jdbc.HiveDriver" user = "hive" password = "hive" table = ods_wjw_jb_gxy_hz_glk query = "select a,b,c from ods_wjw_jb_gxy...
`spark.yarn.executor.memoryOverhead`设置为2GB,用于预留额外内存。需要注意的是,两者之和不能超过`yarn.scheduler.maximum-allocation-mb`设置的值,本集群中该值为60GB。 ##### 1.2 配置Driver内存 Driver端是...
如果看到`FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask`,这可能是因为MapJoin操作导致的问题。为避免这类错误,可以尝试设置`hive.auto.convert.join = false...
hiveSQL执行文件
被编译的hive-hbase-handler-1.2.1.jar,用于在Hive中创建关联HBase表的jar,解决创建Hive关联HBase时报FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop....
在Hive中,常见的报错信息为“Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTase”。这个错误信息通常不能直接解决问题,需要查看日志来确定问题的原因。日志存放目录为/shbigdata...
在创建表时,如果出现错误 `FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.Cannot validate serde`,说明 Hive 服务端没有 `hive_hcatalog_core_[版本号].jar` 包,需要将该...