我正在尝试使用带有cqlstoragehandler的配置单元从cassandra读取数据。
版本:
Hive0.11.0
hadoop 1.2.1版
Cassandra1.2.6
我可以用以下配置单元查询创建外部表
使用serdeproperties(“cassandra.columns.mapping”=“:key,name,address”,“cassandra.ks.name”=“cassandradb”,“cassandra.host”=“localhost”,“cassandra.port”=“9160”)TBLProperty(“cassandra.input.split.size”=“64000”,“cassandra.range.size”=“1000”,“cassandra.slice.predicate.size”=“1000”);
(表“input”已经存在,并且包含用cql3创建的cassandra中的一些数据)
但是,当我尝试使用以下查询读取数据时
从输入中选择*其中number=“1”;
我面临以下问题:
mapreduce作业总数=1
正在启动作业1(共1个)
由于没有reduce运算符,reduce任务数设置为0
java.io.ioexception:无法在org.apache.cassandra.hadoop.abstractcolumnfamilyinputformat.getsplits(abstractcolumnfamilyinputformat)获取输入拆分。java:189)位于org.apache.hadoop.hive.cassandra.input.cql.hivecqlinputformat.getsplits(hivecqlinputformat)。java:213)在org.apache.hadoop.hive.cassandra.input.cql.hivecqlinputformat.getsplits(hivecqlinputformat)。java:169)位于org.apache.hadoop.hive.ql.io.hiveinputformat.getsplits(hiveinputformat)。java:292)位于org.apache.hadoop.hive.ql.io.combinehiveinputformat.getsplits(combinehiveinputformat)。java:297)在org.apache.hadoop.mapred.jobclient.writeoldsplits(jobclient。java:1081)在org.apache.hadoop.mapred.jobclient.writeslits(jobclient。java:1073)访问org.apache.hadoop.mapred.jobclient.access$700(jobclient。java:179)在org.apache.hadoop.mapred.jobclient$2.run(jobclient。java:983)在org.apache.hadoop.mapred.jobclient$2.run(jobclient。java:936)在javax.security.auth.subject.doas(主题)中的java.security.accesscontroller.doprivileged(本机方法)。java:415)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1190)在org.apache.hadoop.mapred.jobclient.submitjobinternal(jobclient。java:936)在org.apache.hadoop.mapred.jobclient.submitjob(jobclient。java:910)在org.apache.hadoop.hive.ql.exec.execdriver.execute(execdriver。java:447)位于org.apache.hadoop.hive.ql.exec.mapredtask.execute(mapredtask)。java:138)在org.apache.hadoop.hive.ql.exec.task.executetask(任务。java:144)位于org.apache.hadoop.hive.ql.exec.taskrunner.runsequential(taskrunner)。java:57)在org.apache.hadoop.hive.ql.driver.launchtask(驱动程序。java:1355)在org.apache.hadoop.hive.ql.driver.execute(driver。java:1139)在org.apache.hadoop.hive.ql.driver.run(driver。java:945)在org.apache.hadoop.hive.cli.clidriver.processlocalcmd(clidriver。java:259)在org.apache.hadoop.hive.cli.clidriver.processcmd(clidriver。java:216)在org.apache.hadoop.hive.cli.clidriver.processline(clidriver。java:413)在org.apache.hadoop.hive.cli.clidriver.run(clidriver。java:756)位于org.apache.hadoop.hive.cli.clidriver.main(clidriver。java:614)在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)在sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:57)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:606)在org.apache.hadoop.util.runjar.main(runjar。java:160)原因:java.util.concurrent.executionexception:java.lang.numberformatexception:对于输入字符串:“143514173170822869679056708180186660043”位于java.util.concurrent.futuretask.report(futuretask。java:122)在java.util.concurrent.futuretask.get(futuretask。java:188)位于org.apache.cassandra.hadoop.abstractcolumnfamilyinputformat.getsplits(abstractcolumnfamilyinputformat)。java:185) ... 31其他原因:java.lang.numberformatexception:对于输入字符串:“143514173170822869679056708180186660043”位于java.lang.numberformatexception.forinputstring(numberformatexception)。java:65)在java.lang.long.parselong(long。java:444)在java.lang.long.valueof(long。java:540)在org.apache.cassandra.dht.murru3partitioner$1.fromstring(murru3partitioner。java:188)位于org.apache.cassandra.hadoop.abstractcolumnfamilyinputformat$splitcallable.call(abstractcolumnfamilyinputformat)。java:239)位于org.apache.cassandra.hadoop.abstractcolumnfamilyinputformat$splitcallable.call(abstractcolumnfamilyinputformat)。java:207)在java.util.concurrent.futuretask.run(futuretask。java:262)位于java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor。java:1145)在java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor。java:615)在java.lang.thread.run(线程。java:744)作业提交失败,出现异常“java.io.ioexception(无法获取输入splits)'失败:执行错误,从org.apache.hadoop.hive.ql.exec.mapredtask返回代码1
我遗漏了什么吗?请告知。
暂无答案!
目前还没有任何答案,快来回答吧!