Hive-Hbase集成问题-org / apache / hadoop / hive / hbase / HiveHBaseTableInputFormat

时间:2015-08-07 19:23:29

标签: hadoop hive hbase hiveql

我正在尝试用Hbase整合hive。我正在使用关键VM

add jar /usr/lib/gphd/hive/lib/hive-hbase-handler-0.12.0-gphd-3.0.0.0.jar
add jar /usr/lib/gphd/hive/lib/guava-11.0.2.jar;
add jar /usr/lib/gphd/hbase/lib/hbase-common.jar;
add jar /usr/lib/gphd/zookeeper/zookeeper.jar;
add jar /usr/lib/gphd/hbase/lib/protobuf-java-2.5.0.jar;

我的hive查询如下:

create TABLE hbase_table
(age int, name string,id string,sal string) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,personal data:age,personal data:name,professional data:id,,professional data:sal") 
TBLPROPERTIES ("hbase.table.name" = "employee");  

但它给出了错误:

 Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat

1 个答案:

答案 0 :(得分:1)

HIVE_AUX_JARS_PATH 环境变量更改为/usr/lib/gphd/hbase/lib/中的/etc/hive/conf/hive-env.sh

这应解决问题。