0
votes

Hi i am planning to integrate HBase and HIVE for one of my project . I am confused in adding jars and where to add these jars?
I am using Hadoop 2.6.0-cdh5.7.0 .

I have downloaded jars:

guava-r09.jar
hbase-0.92.0.jar
hive-hbase-handler-0.9.0.jar
zookeeper-3.3.4.jar

I ran this command to create table

CREATE TABLE hbase_table_emp(id int, name string, role string) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:name,cf1:role")
TBLPROPERTIES ("hbase.table.name" = "emp");

Now where should I copy all this jars?
Do i have to copy in /usr/lib/hive location and then i have to run add jar command?
All this jar version will work for my Hadoop version ?
I have just copied jars in one of the directory and then providing path to directory in hive, I am running add jars command, but it throws error:

    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.IllegalArgumentException: Not a host:port pair: PBUF

quickstart.cloudera���ʼ��+��
1

1 Answers

0
votes

If you place jars in /lib directory then all jars automatically available in hive CLASSPATH and you don't need add those jars explicitly again using add jar command.

The error you getting because add jar command expect fully qualified path of a jar.

add jar <fully qualified path of jar>;

Read hive-hbase handler for more details.