I have been trying to Store data in HBase suing HbaseStorage class. While I
can store the original read data, it fails when I try to store the processed
data.
Which means I might be messing up the datatypes somewhere.
My script below is :-
--REGISTER myudfs.jar
--A = load 'hbase://transaction' using
org.apache.pig.backend.hadoop.hbase.HBaseStorage('log:ref2', '-loadKey') AS
(row:chararray, code:chararray) ;
--grp = group A by myudfs.Parser(code);
--ct = foreach grp generate group,COUNT(A.code) as count;
--sorted = order ct by count desc;
--result = foreach sorted generate $0 as row,(chararray)$1;
--store result into 'pig_test' USING
org.apache.pig.backend.hadoop.hbase.HBaseStorage('log:count');
The dump of "result" works but the store to Hbase fails.
WHen I try to store A it works fine.
Datatypes of A and result are :-
A: {row: chararray,code: chararray}
result: {row: chararray,count: chararray}