1
votes

I have a hive+hbase integration cluster. I created a table by: CREATE TABLE hbase_table_1(key int, value string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val") TBLPROPERTIES ("hbase.table.name" = "xyz");

it is ok when execute: select * from hbase_table_1;

but when I execute count operation, the classnotfound error will happen. select count(*) from hbase_table_1;

error info is: java.io.IOException:cannot find class at org.apache.............HiveInputformat.getRecordReader(HiveInputFormat.java:220) ........... Caused by:java.lang.ClassNoteFoundException: at java.lang.Class.forName0(Native Method)

those error message does not notice me which class.

Sorry for my poor English.

Any one encounter this issue?

1
I write the error message by hand. I cannot copy it from cluster machine because the permission.feng xu

1 Answers

0
votes
1) COPY THESE FILES TO THE HADOOP LIBRARY.

    sudo cp /usr/lib/hive/lib/hive-common-0.7.0-cdh3u0.jar  /usr/lib/hadoop/lib/

    sudo cp /usr/lib/hive/lib/hbase-0.90.1-cdh3u0.jar  /usr/lib/hadoop/lib/

    sudo cp /usr/lib/hive/lib/hbase-0.90.1-cdh3u0.jar  /usr/lib/hadoop/lib/



    2)CLOSE HBASE AND HADOOP USING FOLLOWING COMMOND

    /usr/lib/hadoop/bin/stop-all.sh
    /usr/lib/hbase/bin/stop-hbase.sh

3) RESTART HBASE AND HADOOP USING COMMOND 
 /usr/lib/hadoop/bin/start-all.sh
/usr/lib/hadoop/bin/start-hbase.sh

Now create table in hive using Hbase storage handler.