我在一个hadoop集群上工作,hortonworks2.4发行版。我想在 hive 的table上做酸处理。这是我的声明:
CREATE TABLE myAcidTable (..)
CLUSTERED BY(myKey) INTO 1 BUCKETS
STORED AS ORC TBLPROPERTIES ('transactional'='true','orc.compress'='SNAPPY');
我基于具有相同结构的外部配置单元表填充此表。
INSERT INTO myAcidTable
SELECT * FROM MyTmpTable;
此操作效果良好:
正在将数据加载到表myacidtable
表myacidtable stats:[numfiles=1,numrows=4450,totalsize=42001,rawdatasize=0]
好 啊
我尝试通过配置单元shell查询此表:
set hive.support.concurrency=true;
set hive.enforce.bucketing=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.compactor.initiator.on=true;
set hive.compactor.worker.threads=3;
SELECT * FROM myAcidTable
WHERE myKey = 12;
但我有一个错误(即使状态看起来正常):
好 啊
失败,出现异常java.io.ioexception:java.lang.runtimeexception:严重问题
当我翻阅日志时,我发现:
org.apache.ambari.view.hive.client.hiveerrorstatusexception:h170无法获取结果。java.io.ioexception:java.lang.runtimeexception:严重问题
...
原因:java.util.concurrent.executionexception:java.lang.illegalargumentexception:delta_0000000_0000000不以base开头_
这很奇怪,因为当我在没有事务属性的情况下声明表时,select语句工作得很好
CREATE TABLE myAcidTable (..)
CLUSTERED BY(myKey) INTO 1 BUCKETS
STORED AS ORC TBLPROPERTIES ('orc.compress'='SNAPPY');
SELECT * FROM myAcidTable
WHERE myKey = 12;
结果:
好 啊
12 ...
你知道去哪儿找吗?谢谢你的帮助。
完整错误:
org.apache.hive.service.cli.hivesqlexception:java.io.ioexception:java.lang.runtimeexe
option:org.apache.hive.service.cli.operation.sqloperation.getnextrowset(sqloperation)出现严重问题。java:352)位于org.apache.hive.service.cli.operation.operationmanager.getoperationnextrowset(operationmanager。java:223)在org.apache.hive.service.cli.session.hivesessionimpl.fetchresults(hivesessionimpl。java:716)在sun.reflect.generatedmethodaccessor24.invoke(未知源)位于sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl)。java:43)在java.lang.reflect.method.invoke(方法。java:497)位于org.apache.hive.service.cli.session.hivesessionproxy.invoke(hivesessionproxy)。java:78)在org.apache.hive.service.cli.session.hivesessionproxy.access$000(hivesessionproxy。java:36)在org.apache.hive.service.cli.session.hivesessionproxy$1.run(hivesessionproxy。java:63)位于javax.security.auth.subject.doas(subject)的java.security.accesscontroller.doprivileged(本机方法)。java:422)在org.apache.hadoop.security.usergroupinformation.doas(用户组信息。java:1657)位于org.apache.hive.service.cli.session.hivesessionproxy.invoke(hivesessionproxy)。java:59)com.sun.proxy.$proxy22.fetchresults(未知源),org.apache.hive.service.cli.cliservice.fetchresults(cliservice)。java:454)在org.apache.hive.service.cli.thrift.thriftcliservice.fetchresults(thriftcliservice。java:672)在org.apache.hive.service.cli.thrift.tcliservice$processor$fetchresults.getresult(tcliservice。java:1557)在org.apache.hive.service.cli.thrift.tcliservice$processor$fetchresults.getresult(tcliservice。java:1542)在org.apache.thrift.processfunction.process(processfunction。java:39)在org.apache.thrift.tbaseprocessor.process(tbaseprocessor。java:39)在org.apache.hive.service.auth.tsetipaddressprocessor.process(tsetipaddressprocessor。java:56)在org.apache.thrift.server.tthreadpoolserver$workerprocess.run(tthreadpoolserver。java:285)在java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor。java:1142)在java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor。java:617)在java.lang.thread.run(线程。java:745)原因:java.io.ioexception:java.lang.runtimeexception:出现严重问题org.apache.hadoop.hive.ql.exec.fetchoperator.getnextrow(fetchoperator)。java:512)位于org.apache.hadoop.hive.ql.exec.fetchoperator.pushrow(fetchoperator)。java:419)在org.apache.hadoop.hive.ql.exec.fetchtask.fetch(fetchtask。java:143)在org.apache.hadoop.hive.ql.driver.getresults(driver。java:1737)在org.apache.hive.service.cli.operation.sqloperation.getnextrowset(sqloperation。java:347) ... 24个以上原因:java.lang.runtimeexception:org.apache.hadoop.hive.ql.io.orc.orcinputformat.generatesplitsinfo(orcinputformat)出现严重问题。java:1115)位于org.apache.hadoop.hive.ql.io.orc.orcinputformat.getsplits(orcinputformat)。java:1142)位于org.apache.hadoop.hive.ql.exec.fetchoperator.getnextsplits(fetchoperator)。java:367)在org.apache.hadoop.hive.ql.exec.fetchoperator.getrecordreader(fetchoperator)。java:299)位于org.apache.hadoop.hive.ql.exec.fetchoperator.getnextrow(fetchoperator)。java:450) ... 28更多原因:java.util.concurrent.executionexception:java.lang.illegalargumentexception:delta_0000000_0000000不以java.util.concurrent.futuretask.report(futuretask)处的base_uu开头。java:122)在java.util.concurrent.futuretask.get(futuretask。java:192)在org.apache.hadoop.hive.ql.io.orc.orcinputformat.generatesplitsinfo(orcinputformat)。java:1092) ... 32更多原因:java.lang.illegalargumentexception:delta_0000000_0000000不以base_u2;开头,位于org.apache.hadoop.hive.ql.io.acidutils.parsebase(acidutils)。java:154)在org.apache.hadoop.hive.ql.io.acidutils.parsebasebucketfilename(acidutils。java:182)在org.apache.hadoop.hive.ql.io.orc.orcinputformat$filegenerator.call(orcinputformat)。java:725)在org.apache.hadoop.hive.ql.io.orc.orcinputformat$filegenerator.call(orcinputformat。java:690)在java.util.concurrent.futuretask.run(futuretask。java:266) ... 3个以上
1条答案
按热度按时间uxh89sit1#
这可能是因为您在创建表或将数据加载到表时使用了错误的事务管理器。
就我而言,我有
org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager
而不是org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
为了消除错误,您需要删除表,设置正确的事务管理器,即hive> set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
然后重新创建表。