hive集成hbase异常


hive集成hbase之后,查询出现以下异常,则说明对应的jar包没有指定:

 
  
  
  
  
  1. Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce.TableSplit

  2. Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.client.HTable

  3. Error: java.io.IOException: java.io.IOException: java.lang.reflect.InvocationTargetException Caused by: java.lang.ClassNotFoundException: org.cloudera.htrace.Traceat java.net.URLClassLoader$1.run(URLClassLoader.java:366)

  4. Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingInterface

解决方法:需要在hive/conf/hive-site.xml中指定jar包路径。

<property> <name>hive.aux.jars.path</name> <value>file:///usr/lib/gphd/hbase/lib/hbase-server.jar,file:///usr/lib/gphd/hbase/lib/hbase-client.jar,file:///usr/lib/gphd/hbase/lib/hbase-protocol.jar,file:///usr/lib/gphd/hbase/lib/htrace-core-2.01.jar</value> </property>

以下是抛出的错误类对应的jar包

Class Name Jar Name
TableSplit hbase-server.jar
HTable hbase-client.jar
MasterProtos hbase-protocol.jar
org.cloudera.htrace.Trace htrace-core-2.01.jar

原文: https://support.pivotal.io/hc/en-us/articles/203025186-Hive-Query-from-Tableau-failed-with-error-Execution-Error-return-code-2-from-org-apache-hadoop-hive-ql-exec-mr-MapRedTask


 

你可能感兴趣的:(hadoop,hive,hbase)