Welcome to the Cloudera Community

Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this topic

Pig store data to Hbase Error when using Hue

avatar
New Contributor

My CDH version is 5.1.2, my Hbase version is 0.98.1, my Hue version is 3.6.0. I executed this pig script to load data from Hbase in Hue:

 

c = LOAD 'hbase://analyze_block_v1' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('d:*', '-loadKey true');
dump c;

 I got this error : 

ERROR org.apache.pig.tools.grunt.Grunt  - ERROR 2998: Unhandled internal error. org/apache/hadoop/hbase/mapreduce/TableInputFormat.

The guide for CDH 5.1.x here and GetHue's guide here tell me that i need to register these file to top of the pig script:

 

register /usr/lib/zookeeper/zookeeper-<ZooKeeper_version>-cdh<CDH_version>.jar

register /usr/lib/hbase/hbase-<HBase_version>-cdh<CDH_version>-security.jar

The problem is that i can't find the file "hbase-0.98.1-cdh5.1.2-security.jar"  in my Hbase folder  go along with CDH 5.1.2.

I also checked the Hbase package at CDH5.1.2 download page and still can't find hbase-0.98.1-cdh5.1.2-security.jar. It seem it has been removed from Hbase 0.98.1.

 

I also tried this but still got the same error

REGISTER /usr/lib/hbase/lib/hbase-*.jar;
REGISTER /usr/lib/hbase/lib/protobuf-java-2.5.0.jar
REGISTER /usr/lib/hbase/lib/zookeeper.jar;
REGISTER /usr/lib/hbase/lib/guava-12.0.1.jar;

set hbase.zookeeper.quorum 'localhost'

c = LOAD 'hbase://analyze_block_v1' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('d:*', '-loadKey true');
dump c;

 

Would you please help me fix this error!

 

Thanks !

 

 

Who agreed with this topic