Tuesday, 10 September 2013

PIG - HBASE - HBaseStorage key filter (gt, lt)

PIG - HBASE - HBaseStorage key filter (gt, lt)

In a PIG script, I'm using HBaseStorage to load all the rows from an
HBase-table. However, I'd like to filter the rows by the rowkey.
I looked at the source code, and i can send in -gt & -lt through the
constructor. However, I can't figure out how to pass my value into the
constructor. It is a byte[]...
Here is where I'm at:
LOAD 'hbase://TABLE' USING
org.apache.pig.backend.hadoop.hbase.HBaseStorage('CF:I','-caster
HBaseBinaryConverter') AS (product_id:bytearray);
If possible could you pls provide sample code...

No comments:

Post a Comment