Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Pig + cassandra Error ERROR 1070: Could not resolve CassandraStorage


Copy link to this message
-
Pig + cassandra Error ERROR 1070: Could not resolve CassandraStorage
Hi all:

I,m newie at Pig  and I need read from cassandra DB, but i have this error
when y i`m trying LOAD anything data from cassandra, for example:

i download cassandra 1.2.0-src and config .basrc_profile
*rows = LOAD 'cassandra://pygmalion/account' USING CassandraStorage();
2013-04-04 19:33:10,304 [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:
/Users/mamartin/Desarrollo/cassandra/apache-cassandra-1.2.0-src/examples/pig/bin/pig_1365096786052.log
*
*
*
*
*
My environmet config Is this:
   - mac OX lion
   - Cassandra 1.2.0
   - pig 0.11.1
   - hadoop 1.1.1
1.- cassandra run OK with two datanode in local in 127.0.0.1 and 127.0.0.2

2.- I`ve create columFamily from pygmalion data  and is ok store in
Cassandra

3.-  I run script pig_cassandra  in local with ./pig_casandra -x local (i
try too with hadoop and run ok)

4 i have the error in load data from cassandra
---------------------------------------
I`m frustated because i revised the documentation from casandra ,
pygmalion,   i search info at google, stackoverfow, etc but i can find a
solution.

I saw this blog
http://frommyworkshop.blogspot.tw/2012/07/single-node-hadoop-cassandra-pig-setup.html

but dont works for me.
I try to load data with:

grunt> rows = LOAD 'cassandra://pygmalion/account' USING *
org.apache.cassandra.hadoop.pig.CassandraStorage*();
2013-04-04 19:52:13,248 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 2998: Unhandled internal error. org/apache/pig/*StoreFuncInterface*
Details at logfile:
/Users/mamartin/Desarrollo/cassandra/apache-cassandra-1.2.0-src/examples/pig/bin/pig_1365096786052.log
And i catch another error  => java.lang.NoClassDefFoundError:
org/apache/pig/StoreFuncInterface

and if i try any LOAD data from cassandra or file after execute this , i
get always this error , no the first. so i close the pig shell.
I`m trying load jars directly in grunt with *register like*
*
*
*
grunt> register
/Users/mamartin/Desarrollo/cassandra/apache-cassandra-1.2.0-1/lib/apache-cassandra-1.2.0.jar
but i have the same error
*
I appreciate any help or any idea

Thanks in advance..

PD:

 logs and config is this:
====================.bash_profile
====================export HADOOP_PREFIX=/usr/local/Cellar/hadoop/1.1.1/libexec
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$HADOOP_HOME/bin
export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
export PIG_HOME=/Users/mamartin/Desarrollo/pig-0.11.1
export PIG_CONF_DIR=/usr/local/Cellar/hadoop/1.1.1/libexec/conf
export PIG_INITIAL_ADDRESS=localhost
export PIG_RPC_PORT=9160
export PIG_PARTITIONER=org.apache.cassandra.dht.RandomPartitioner
====================Log
====================
Pig Stack Trace
---------------
ERROR 1070: Could not resolve CassandraStorage using imports: [,
org.apache.pig.builtin., org.apache.pig.impl.builtin.]

Failed to parse: Pig script failed to parse:
<line 1, column 48> pig script failed to validate:
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.parser.QueryParserDriver.parse(QueryParserDriver.java:191)
at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1571)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1544)
at org.apache.pig.PigServer.registerQuery(PigServer.java:516)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:991)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:412)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
at org.apache.pig.Main.run(Main.java:538)
at org.apache.pig.Main.main(Main.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by:
<line 1, column 48> pig script failed to validate:
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.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1209)
at
org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:1194)
at
org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4766)
at
org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3183)
at
org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1315)
at
org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:799)
at
org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:517)
at
org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:392)
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:184)
... 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:523)
at
org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1206)
... 23 more
===============================================================================Pig Stack Trace
ERROR 2998: Unhandled internal error. org/apache/pig/StoreFuncInterface

java.lang.NoClassDefFoundError: org/apache/pig/StoreFuncInterface
at java.lang.ClassLoader.defineClass1(Nativ
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB