2014-03-28 2 views
3

이 문제는 Integrating Hbase with Hive: Register Hbase table과 계속됩니다.WHERE 절이 작동하지 않는 쿼리

하이브에서 외부 Hbase 테이블을 쿼리하고 있습니다.

나는 간단한 쿼리

select * from Document_Table_Hive 

을 수행 할 때 쿼리가 작동하고 나는 테이블에 저장된 기록을 얻을.

하지만 where 절을 사용하여 쿼리를 수행 할 때. 작동하지 않습니다.

hive> select * from Document_Table_Hive where key = "news-9630"; 
Total MapReduce jobs = 1 
Launching Job 1 out of 1 
Number of reduce tasks is set to 0 since there's no reduce operator 
Starting Job = job_1395999255539_0006, Tracking URL = http://sandbox.hortonworks.com:8088/proxy/application_1395999255539_0006/ 
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1395999255539_0006 
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 
2014-03-28 04:00:19,441 Stage-1 map = 0%, reduce = 0% 
2014-03-28 04:01:01,873 Stage-1 map = 100%, reduce = 0% 
Ended Job = job_1395999255539_0006 with errors 
Error during job, obtaining debugging information... 
Examining task ID: task_1395999255539_0006_m_000000 (and more) from job job_1395999255539_0006 

Task with the most failures(4): 
----- 
Task ID: 
    task_1395999255539_0006_m_000000 

URL: 
    http://sandbox.hortonworks.com:8088/taskdetails.jsp?jobid=job_1395999255539_0006&tipid=task_1395999255539_0006_m_000000 
----- 
Diagnostic Messages for this Task: 
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce.TableSplit 
     at java.net.URLClassLoader$1.run(URLClassLoader.java:202) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 
     at java.lang.Class.getDeclaredConstructors0(Native Method) 
     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) 
     at java.lang.Class.getConstructor0(Class.java:2699) 
     at java.lang.Class.getDeclaredConstructor(Class.java:1985) 
     at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:125) 
     at org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:144) 
     at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:71) 
     at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:42) 
     at org.apache.hadoop.mapred.MapTask.getSplitDetails(MapTask.java:370) 
     at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:402) 
     at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) 
     at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at javax.security.auth.Subject.doAs(Subject.java:396) 
     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491) 
     at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157) 


FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 
MapReduce Jobs Launched: 
Job 0: Map: 1 HDFS Read: 0 HDFS Write: 0 FAIL 
Total MapReduce CPU Time Spent: 0 msec 

나는 그것이 클래스 경로에 문제가 있음을 이해하지만, 나는 /usr/lib/Hive/lib/에 복사 된 모든 .jar들 수 있습니다. 이 문제를 어떻게 해결할 수 있습니까?

답변

0
hive> select * from test1 where name = 'Amutha'; 
Total MapReduce jobs = 1 
Launching Job 1 out of 1 
Number of reduce tasks is set to 0 since there's no reduce operator 
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 
2014-09-24 18:16:07,230 Stage-1 map = 0%, reduce = 0% 
2014-09-24 18:16:18,337 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:19,344 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:20,364 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:21,385 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:22,409 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:23,417 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:24,425 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:25,433 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:26,548 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:27,560 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:28,568 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:29,576 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec 
2014-09-24 18:16:30,598 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 2.21 sec 
MapReduce Total cumulative CPU time: 2 seconds 210 msec 
Ended Job = job_201409241729_0005 
MapReduce Jobs Launched: 
Job 0: Map: 1 Cumulative CPU: 2.21 sec HDFS Read: 323 HDFS Write: 0 SUCCESS 
Total MapReduce CPU Time Spent: 2 seconds 210 msec 
OK 
Time taken: 40.095 seconds 
hive> 
+2

이 정보를 더 잘 포맷 할 수 있습니까? 이 대답은 충분하지 않다. – Xstian

+0

결과물을 출력하는 대신 실제로 대답을 설명하면 도움이 될 것이다. – skrrgwasme

+0

Hbase, Hadoop 및 Hive의 버전을 설치할 수 있습니까? – Afaque

관련 문제