3
votes

I want load data through pig & process it into HBase. I have load text file on to HDFS. and then I have used below commands on pig.

A = LOAD '/tmp/hive-Vijay.Shinde/file.txt' USING PigStorage(',')
 as (strdata1:chararray, strdata2:int); 

then i used ,

STORE A INTO 'mydata' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('mycf:strdata2');

mydata is table in HBase.

It gives error: Unhandled internal error

2

2 Answers

1
votes
  1. Try to register the hbase jar in your pig file. for eg . register /home/hadoop/lib/hbase-0.92.0.jar
  2. Make sure that you created hbase table with column family before inserting the data.
  3. Also mention version of hadoop,pig and hbase.
  4. Also you can check your debug logs with web interface . if you are running cluster locally use localhost/jobtracker.jsp

    This will give you the more useful log information about job.

0
votes

This statement might work:

STORE A into 'hbase://table_name' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf1:*');