Dear Sachin,

Hope you are doing great.

Once we have the data in HDFS so we can easily transfer using PIG to Hbase.

Method 1 :

Here is a Pig script that would do the job for you, after you have created the table and the column family. To create the table and the column family, you'll do:

$ hbase shell

> create 'mydata', 'mycf'

Move the file to HDFS:

$ hadoop fs -put /home/file.txt /user/edu/file.txt

Then, write the pig script to store with HBaseStorage:

A = LOAD 'file.txt' USING PigStorage(',') as (strdata:chararray, intdata:long);

STORE A INTO 'hbase://mydata'

USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('mycf:intdata');

Method 2 :

If you want you can also use Cloudera here.

Below are the details availabe:

Please try and let us know if you have any other issue so we can help you out here.