配置单元版本:1.0
select SUM(table.quantity * table.our_price) from table;
此简单查询失败并出现此错误,
此任务的诊断消息:error:java.lang.runtimeexception:org.apache.hadoop.hive.ql.metadata.hiveexception:hive runtime error while processing row(tag=0)[获取具有异常的行数据时出错java.lang.arrayindexoutofboundsexception:1 at org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.readvint(lazybinaryutils)。java:310)在org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.checkobjectbyteinfo(lazybinaryutils。java:215)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.parse(lazybinarystruct。java:142)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.getfield(lazybinarystruct。java:199)在org.apache.hadoop.hive.serde2.lazybinary.objectinspector.lazybinarystructobjectinspector.getstructfielddata(lazybinarystructobjectinspector)。java:64)位于org.apache.hadoop.hive.serde2.serdeutils.buildjsonstring(serdeutils。java:353)位于org.apache.hadoop.hive.serde2.serdeutils.buildjsonstring(serdeutils。java:353)在org.apache.hadoop.hive.serde2.serdeutils.getjsonstring(serdeutils。java:197)位于org.apache.hadoop.hive.serde2.serdeutils.getjsonstring(serdeutils。java:183)在org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer。java:248)在org.apache.hadoop.mapred.reducetask.runoldreducer(reducetask。java:455)在org.apache.hadoop.mapred.reducetask.run(reducetask。java:397)在org.apache.hadoop.mapred.yarnchild$2.run(yarnchild。java:172)位于javax.security.auth.subject.doas(subject)的java.security.accesscontroller.doprivileged(本机方法)。java:415)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1657)在org.apache.hadoop.mapred.yarnchild.main(yarnchild。java:166)]位于org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer。java:265)在org.apache.hadoop.mapred.reducetask.runoldreducer(reducetask。java:455)在org.apache.hadoop.mapred.reducetask.run(reducetask。java:397)在org.apache.hadoop.mapred.yarnchild$2.run(yarnchild。java:172)在javax.security.auth.subject.doas(主题)中的java.security.accesscontroller.doprivileged(本机方法)。java:415)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1657)在org.apache.hadoop.mapred.yarnchild.main(yarnchild。java:166)原因:org.apache.hadoop.hive.ql.metadata.hiveexception:配置单元运行时出错正在处理行(tag=0)[获取行数据时出错,org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.readvint(lazybinaryutils)处出现异常java.lang.arrayindexoutofboundsexception:1。java:310)在org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.checkobjectbyteinfo(lazybinaryutils。java:215)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.parse(lazybinarystruct。java:142)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.getfield(lazybinarystruct。java:199)在org.apache.hadoop.hive.serde2.lazybinary.objectinspector.lazybinarystructobjectinspector.getstructfielddata(lazybinarystructobjectinspector。java:64)在org.apache.hadoop.hive.serde2.serdeutils.buildjsonstring(serdeutils。java:353)位于org.apache.hadoop.hive.serde2.serdeutils.buildjsonstring(serdeutils。java:353)位于org.apache.hadoop.hive.serde2.serdeutils.getjsonstring(serdeutils。java:197)位于org.apache.hadoop.hive.serde2.serdeutils.getjsonstring(serdeutils。java:183)在org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer。java:248)在org.apache.hadoop.mapred.reducetask.runoldreducer(reducetask。java:455)在org.apache.hadoop.mapred.reducetask.run(reducetask。java:397)在org.apache.hadoop.mapred.yarnchild$2.run(yarnchild。java:172)位于java.security.accesscontroller.doprivileged(本机方法)javax.security.auth.subject.doas(主题。java:415)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1657)在org.apache.hadoop.mapred.yarnchild.main(yarnchild。java:166)]位于org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer。java:253) ... 7其他原因:org.apache.hadoop.hive.ql.metadata.hiveexception:java.lang.arrayindexoutofboundsexception:1 at org.apache.hadoop.hive.ql.exec.groupbyoperator.processop(groupbyoperator)。java:791)在org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer。java:244) ... 7其他原因:java.lang.arrayindexoutofboundsexception:1位于org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.readvint(lazybinaryutils)。java:310)在org.apache.hadoop.hive.serde2.lazybinary.lazybinaryutils.checkobjectbyteinfo(lazybinaryutils。java:215)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.parse(lazybinarystruct。java:142)在org.apache.hadoop.hive.serde2.lazybinary.lazybinarystruct.getfield(lazybinarystruct。java:199)在org.apache.hadoop.hive.serde2.lazybinary.objectinspector.lazybinarystructobjectinspector.getstructfielddata(lazybinarystructobjectinspector。java:64)在org.apache.hadoop.hive.ql.exec.exprnodecolumnevaluator.\u evaluate(exprnodecolumnevaluator。java:98)位于org.apache.hadoop.hive.ql.exec.exprnodeevaluator.evaluate(exprnodeevaluator。java:77)位于org.apache.hadoop.hive.ql.exec.exprnodeevaluator.evaluate(exprnodeevaluator。java:65)在org.apache.hadoop.hive.ql.exec.groupbyoperator.updateaggregations(groupbyoperator)。java:597)位于org.apache.hadoop.hive.ql.exec.groupbyoperator.processaggr(groupbyoperator。java:888)位于org.apache.hadoop.hive.ql.exec.groupbyoperator.processkey(groupbyoperator。java:718)在org.apache.hadoop.hive.ql.exec.groupbyoperator.processop(groupbyoperator。java:786) ... 8个以上
我没有从这个错误中得到什么。
1条答案
按热度按时间nhn9ugyo1#
我从“arrayindexoutofboundsexception”中猜测,table.quantity和table.price中可能有null、空,或者总和结果太大。如果总和太大,则应将值转换为bigint: