Pig_Cassandra integration caused - ERROR 1070: Could not resolve CassandraStorage using imports:

Posted by Le Dude on Server Fault See other posts from Server Fault or by Le Dude
Published on 2012-10-25T04:57:53Z Indexed on 2012/10/25 5:05 UTC
Read the original article Hit count: 700

Filed under:
|
|

I'm following basic Pig, Cassandra, Hadoop installation. Everything works just fine as a stand alone. No error. However when I tried to run the example file provided by Pig_cassandra example, I got this error.

[root@localhost pig]# /opt/cassandra/apache-cassandra-1.1.6/examples/pig/bin/pig_cassandra
-x local -x local /opt/cassandra/apache-cassandra-1.1.6/examples/pig/example-script.pig 
Using /opt/pig/pig-0.10.0/pig-0.10.0-withouthadoop.jar. 2012-10-24 21:14:58,551 [main] INFO  org.apache.pig.Main - Apache Pig version
0.10.0 (r1328203) compiled Apr 19 2012, 22:54:12 2012-10-24 21:14:58,552 [main] INFO  org.apache.pig.Main - Logging error messages to: /opt/pig/pig_1351138498539.log 2012-10-24 21:14:59,004 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:/// 2012-10-24 21:14:59,472 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve CassandraStorage using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.] Details at logfile: /opt/pig/pig_1351138498539.log

Here is the log file

Pig Stack Trace
---------------
ERROR 1070: Could not resolve CassandraStorage using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Could not resolve CassandraStorage using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
    at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1597)
    at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1540)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:540)
    at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:970)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
    at org.apache.pig.Main.run(Main.java:555)
    at org.apache.pig.Main.main(Main.java:111)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: Failed to parse: Cannot instantiate: CassandraStorage
    at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:184)
    at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1589)
    ... 14 more
Caused by: java.lang.RuntimeException: Cannot instantiate: CassandraStorage
    at org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:510)
    at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
    at org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
    at org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4583)
    at org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3115)
    at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1291)
    at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:789)
    at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:507)
    at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:382)
    at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:175)
    ... 15 more
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve CassandraStorage using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
    at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:495)
    at org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:507)
    ... 24 more
================================================================================

I googled around and got to this point from other stackoverflow user that identified the potential problem but not the solution.

Cassandra and pig integration cause error during startup

I believe my configuration is correct and the path has already been defined properly. I didn't change anything in the pig_cassandra file.

I'm not quite sure how to proceed from here. Please help?

© Server Fault or respective owner

Related posts about centos

Related posts about hadoop