hive脚本出现Error: java.lang.RuntimeException: Error in configuring object和Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9

时间:2022-01-19 23:16:55

是在reduce阶段报的错误,详细错误信息是

朱传豪  19:04:48
Diagnostic Messages for this Task:
Error: java.lang.RuntimeException: Error in configuring object
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:409)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:392)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
... 9 more
Caused by: java.lang.RuntimeException: Reduce operator initialization failed
at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.configure(ExecReducer.java:173)
... 14 more
朱传豪 19:05:00
Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.init(StandardStructObjectInspector.java:121)
at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.<init>(StandardStructObjectInspector.java:109)
at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector(ObjectInspectorFactory.java:283)
at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector(ObjectInspectorFactory.java:268)
at org.apache.hadoop.hive.ql.exec.LateralViewJoinOperator.initializeOp(LateralViewJoinOperator.java:105)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
at org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:401)
at org.apache.hadoop.hive.ql.exec.UDTFOperator.initializeOp(UDTFOperator.java:95)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:65)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
at org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:401)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:65)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
at org.apache.hadoop.hive.ql.exec.GroupByOperator.initializeOp(GroupByOperator.java:427)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.configure(ExecReducer.java:166)
... 14 more FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched:
Stage-Stage-1: Map: 75 Reduce: 5 Cumulative CPU: 2318.05 sec HDFS Read: 5031117214 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 38 minutes 38 seconds 50 msec
朱传豪 19:08:09

  

我的hive版本是hive-0.13.1+cdh5.3.6+397

执行的脚本是:

 insert into table Hive_OnlineFirstActive_newtest partition(ProductId,partitiondate)
select newData.* from (
select mytable.ClientIp,iptocode(mytable.ClientIp,'6') as province,iptocode(mytable.ClientIp,'7') as city,mytable.imei1,mytable.imei2,mytable.plat,mytable.nettype,mytable.myvername,mytable.os,mytable.clientchannel,hour(mytable.serverdate),mytable.productid,substring(mytable.serverdate,1,10) as partitiondate from (
select UniqueImeiUDAF(concat_ws('^',ServerDate,IMEI1,IMEI2,Plat,NetType,MyVername,Os,ProductId,ClientChannel,ClientIp)) as r from Hive_OnlinePvData where partitiondate>='2016-04-16' and partitiondate<='2016-05-01' group by IMEI1,ProductId
)tt lateral view FirstActiveUDTF(r) mytable
)newData
left join
Hive_OnlineFirstActive_newtest oldData
on newData.imei1 = oldData.imei1 and newData.ProductId = oldData.ProductId
where oldData.imei1 is null;

注意,iptocode是个UDF

然后网上查到:https://issues.apache.org/jira/browse/HIVE-5771

我理解,这个是hive的bug,在sql优化器优化时可能找不到udf的jar包,该问题是hive0.14.0进行fixed

hive脚本出现Error: java.lang.RuntimeException: Error in configuring object和Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9的更多相关文章

  1. spring &period;cloud ------------java&period;lang&period;RuntimeException&colon; com&period;netflix&period;client&period;ClientException,Caused by&colon; java&period;lang&period;IllegalArgumentException&colon; MIME type may not contain reserved characters

    1.问题的发生 Feign在默认情况下使用的是JDK原生的URLConnection发送HTTP请求,没有连接池,但是对每个地址会保持一个长连接,即利用HTTP的persistence connect ...

  2. hive跑mapreduce报java&period;lang&period;RuntimeException&colon; Error in configuring object

    写于2016.7月 最近项目需要在hbase上做统计分析,在本机上装了hive,结果跑小批量数据sum时报错: hive> select count(*) from page_view; Tot ...

  3. nested exception is java&period;lang&period;RuntimeException&colon; Error parsing Mapper XML&period; Cause&colon; java&period;lang&period;IllegalArgumentException&colon; Result Maps collection already contains value for

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoSupport': ...

  4. ibatis-java&period;lang&period;RuntimeException&colon; Error setting property &&num;39&semi;setFileSize&&num;39&semi;

    ibatis查询问题:      ibatis-java.lang.RuntimeException: Error setting property 'setFileSize'

  5. 【Spring】java&period;lang&period;IndexOutOfBoundsException&colon; Index&colon; 256&comma; Size&colon; 256

    Spring接受前台的数据超过256出现例如以下异常: org.springframework.beans.InvalidPropertyException: Invalid property 'sp ...

  6. exception java&period;lang&period;IndexOutOfBoundsException&colon; Index&colon; 0&comma; Size&colon; 0

      1.情景展示 Java 报错信息如下: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 2.原因分析 首先,这是越界异常,但不是数组越 ...

  7. 异常:Caused by&colon; java&period;lang&period;NoSuchMethodError&colon; javax&period;persistence&period;OneToMany&period;orphanRemoval&lpar;&rpar;Z&sol;Caused by&colon; java&period;lang&period;NoSuchMethodError&colon; javax&period;persistence&period;JoinColumn&period;foreign

    Spring3.0 + Hibernate3.5:启动服务器报:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany. ...

  8. DataNode启动不成功——java&period;net&period;BindException&colon; Port in use&colon; localhost&colon;0 Caused by&colon; java&period;net&period;BindException&colon; Cannot assign requested address解决办法

    爱折腾的人总是会出线各种奇怪的问题.记得之前听一位大师讲过,我们不能踩完前进路上的所有坑前进,而应该学会怎样避开前进路上的坑,踩得坑越多,可能你的经验越丰富,但是付出的时间代价可能不是经验能换来的.我 ...

  9. java&period;lang&period;IndexOutOfBoundsException&colon; Index&colon; 0&comma; Size&colon; 0 错误

    你的ArrayList 是一个没有值的对象(不是null),也就是里面什么对象也没有存(即:arrayList.size()==0).但是,你有取它下标为0值的操作.所以,数组越界了!!比如array ...

随机推荐

  1. HR外包系统 - 账款

    01 账款-服务费,注意多币种以及收款对象和联系人的设置 02 代收代付,注意多币种以及收款对象和联系人的设置 03 账单要保存服务费计算的整个过程,便于后面出报表和数据分析 04 出报表时,要考虑 ...

  2. apache日志轮转

    apache默认的日志配置为:     ErrorLog "logs/error_log"     CustomLog "logs/access_log" co ...

  3. 记忆2--记忆的&quot&semi;记&quot&semi;和&quot&semi;忆&quot&semi;

    有时候也会想,我们是如何记住东西的?是如何想起来的?在写这篇文章的时候,想起初中的时候(应当是初二),语文老师检查唐诗背诵,在下面觉得已经能背起来的时候,去向老师背诵的时候,忘记了开头,干急想不起来, ...

  4. c&sol;c&plus;&plus; 标准库 map set 大锅炖

    标准库 map set 大锅炖 一,关联容器有哪些 按关键字有序保存元素 map 保存key和value set 只保存key mulutimap key可以重复出现 multiset key可以重复 ...

  5. aix安装nmon

    aix5310以上都系统自带了nmon,其他低版本需要手动安装 软件包下载地址https://www.ibm.com/developerworks/community/wikis/home?lang= ...

  6. MySql常用命令集Mysql常用命令4

    说明: 用中括号([])括起来的部分表示是可选的,用大括号({})括起来的部分是表示必须 从中选择其中的一个. 1 FROM子句 FROM 子句指定了Select语句中字段的来源.FROM子句后面是包 ...

  7. tcp为什么是三次握手

    刷知乎看到的,很可爱啊哈哈哈就顺手黏贴过来了 作者:大闲人柴毛毛链接:https://www.zhihu.com/question/24853633/answer/254224088来源:知乎著作权归 ...

  8. &period;net 报错access to the path c&colon;&bsol;tempimagefiles&bsol;msc&lowbar;cntr&lowbar;0&period;txt is denied

    报错信息: 解决方法: 在 Web.Config 的 <System.Web> 里加 <identity impersonate="true"/> 节点即可 ...

  9. Moleskine智能笔&plus;专用本:写完随时传到手机

    http://www.totiot.com/61805.html Moleskine公司生产的速写本和速写板一直是涂鸦爱好者和速记员们的首选.该公司还联合Adobe. Livescribe. Ever ...

  10. DNA拷贝数变异CNV检测——基础概念篇

    DNA拷贝数变异CNV检测——基础概念篇   一.CNV 简介 拷贝数异常(copy number variations, CNVs)是属于基因组结构变异(structural variation), ...