You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by jacob <ja...@gmail.com> on 2011/01/25 01:15:51 UTC

Using HBaseStorage with Pig 0.8 and HBase 0.89

I'm having problems getting HBaseStorage to work with Pig 0.8 and HBase
0.89. I applied the patch in PIG-1680. Here's the error I see in the
JobTracker logs:

2011-01-24 22:51:25,764 INFO org.apache.hadoop.mapred.TaskInProgress:
Error from attempt_201101201925_0046_m_000001_3:
java.lang.ClassCastException:
org.apache.pig.backend.hadoop.hbase.HBaseStorage cannot be cast to
org.apache.pig.StoreFuncInterface
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore.getStoreFunc(POStore.java:216)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.getCommitters(PigOutputCommitter.java:96)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.<init>(PigOutputCommitter.java:64)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.getOutputCommitter(PigOutputFormat.java:235)
at org.apache.hadoop.mapred.Task.initialize(Task.java:486)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:298)
at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1063)
at org.apache.hadoop.mapred.Child.main(Child.java:211)



and here's the simple pig script I ran:


twuid = LOAD '/tmp/streamed/twitter_user_id/part-00000' AS
(rsrc:chararray,uid:chararray,scrat:chararray,sn:chararray,prot:chararray,foll:chararray,friend:chararray,status:chararray,favo:chararray,crat:chararray,sid:chararray,is_full:chararray,health:chararray);
cut_fields = FOREACH twuid GENERATE uid, sn;
STORE twuid INTO 'my_table' USING
org.apache.pig.backend.hadoop.hbase.HBaseStorage('my_col_fam:screen_name');



Thanks for any help.

--jacob
@thedatachef