Support Questions
Find answers, ask questions, and share your expertise

pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.pig.backend.hadoop.hbase.HbaseStorage using import

Explorer

I am trying to load data into hbase table but it is throwing error :

Caused by:
<line 2, column 57> pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.pig.backend.hadoop.hbase.HbaseStorage using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1339)
at org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:1324)
at org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:5184)
at org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:7782)
at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1669)
at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:1102)
at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:560)
at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:421)
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:191)

 

commands executed:

  • register /usr/hdp/2.6.4.63-2/hbase/lib/hbase-*.jar

rawd = LOAD '/user/bdauser/hbasedata.txt' USING PigStorage(',') AS (product:charArray,type:charArray);

  • : grunt> STORE rawd into 'hbase://odsvivonext:pighbasetest' USING apache.pig.backend.hadoop.hbase.HbaseStorage('hbasedata:product,hbasedata:type');