When trying to run the example-script.pig, I get the following error, null
error.




tsunami:pig schappetj$ bin/pig_cassandra -x local example-script.pig
Using /Library/pig-0.10.0/pig-0.10.0.jar.
2012-12-12 11:02:54,079 [main] INFO  org.apache.pig.Main - Apache Pig
version 0.10.0 (r1328203) compiled Apr 20 2012, 00:33:25
2012-12-12 11:02:54,079 [main] INFO  org.apache.pig.Main - Logging error
messages to: 
/Library/apache-cassandra-1.2.0-beta3-src/examples/pig/pig_1355331774074.log
2012-12-12 11:02:54.211 java[78283:1c03] Unable to load realm info from
SCDynamicStore
2012-12-12 11:02:54,400 [main] INFO
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting
to hadoop file system at: file:///
2012-12-12 11:02:54,890 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: null
Details at logfile:
/Library/apache-cassandra-1.2.0-beta3-src/examples/pig/pig_1355331774074.log





PIG 0.10.0
Cassandra 1.2.0-Beta3 w/source

ENV Osx Lion:
$ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)

set | grep PIG
PIG_HOME=/Library/pig-0.10.0
PIG_INITIAL_ADDRESS=localhost
PIG_PARTITIONER=org.apache.cassandra.dht.RandomPartitioner
PIG_RPC_PORT=9160








Pig Stack Trace
---------------
ERROR 1200: null

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during
parsing. null
        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: null
        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.NullPointerException
        at org.apache.cassandra.utils.Hex.hexToBytes(Hex.java:51)
        at 
org.apache.cassandra.hadoop.ConfigHelper.predicateFromString(ConfigHelper.ja
va:206)
        at 
org.apache.cassandra.hadoop.ConfigHelper.getInputSlicePredicate(ConfigHelper
.java:176)
        at 
org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorag
e.java:577)
        at 
org.apache.cassandra.hadoop.pig.CassandraStorage.getSchema(CassandraStorage.
java:610)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoa
d.java:151)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
        at 
org.apache.pig.parser.LogicalPlanGenerator.alias_col_ref(LogicalPlanGenerato
r.java:15356)
        at 
org.apache.pig.parser.LogicalPlanGenerator.col_ref(LogicalPlanGenerator.java
:15203)
        at 
org.apache.pig.parser.LogicalPlanGenerator.projectable_expr(LogicalPlanGener
ator.java:8881)
        at 
org.apache.pig.parser.LogicalPlanGenerator.var_expr(LogicalPlanGenerator.jav
a:8632)
        at 
org.apache.pig.parser.LogicalPlanGenerator.expr(LogicalPlanGenerator.java:79
84)
        at 
org.apache.pig.parser.LogicalPlanGenerator.flatten_clause(LogicalPlanGenerat
or.java:6103)
        at 
org.apache.pig.parser.LogicalPlanGenerator.flatten_generated_item(LogicalPla
nGenerator.java:5926)
        at 
org.apache.pig.parser.LogicalPlanGenerator.generate_clause(LogicalPlanGenera
tor.java:14101)
        at 
org.apache.pig.parser.LogicalPlanGenerator.foreach_plan(LogicalPlanGenerator
.java:12493)
        at 
org.apache.pig.parser.LogicalPlanGenerator.foreach_clause(LogicalPlanGenerat
or.java:12360)
        at 
org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.ja
va:1577)
        at 
org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGene
rator.java:789)
        at 
org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.ja
va:507)
        at 
org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:3
82)
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:175)
        ... 15 more
============================================================================
====




This is what pig_cassandra with debug enabled outputs:

tsunami:pig schappetj$ bin/pig_cassandra -x local example-script.pig
Using /Library/pig-0.10.0/pig-0.10.0.jar.
Find hadoop at /Library/hadoop-1.0.2/bin/hadoop
dry run:
HADOOP_CLASSPATH: 
/Library/pig-0.10.0/bin/../conf:/Library/Java/JavaVirtualMachines/1.7.0.jdk/
Contents/Home/lib/tools.jar:::bin/../../..//lib/antlr-3.2.jar:bin/../../..//
lib/avro-1.4.0-fixes.jar:bin/../../..//lib/avro-1.4.0-sources-fixes.jar:bin/
../../..//lib/commons-cli-1.1.jar:bin/../../..//lib/commons-codec-1.2.jar:bi
n/../../..//lib/commons-lang-2.6.jar:bin/../../..//lib/compress-lzf-0.8.4.ja
r:bin/../../..//lib/concurrentlinkedhashmap-lru-1.3.jar:bin/../../..//lib/gu
ava-13.0.1.jar:bin/../../..//lib/high-scale-lib-1.1.2.jar:bin/../../..//lib/
jackson-core-asl-1.9.2.jar:bin/../../..//lib/jackson-mapper-asl-1.9.2.jar:bi
n/../../..//lib/jamm-0.2.5.jar:bin/../../..//lib/jline-1.0.jar:bin/../../../
/lib/json-simple-1.1.jar:bin/../../..//lib/libthrift-0.7.0.jar:bin/../../../
/lib/log4j-1.2.16.jar:bin/../../..//lib/metrics-core-2.0.3.jar:bin/../../../
/lib/netty-3.5.9.Final.jar:bin/../../..//lib/servlet-api-2.5-20081211.jar:bi
n/../../..//lib/slf4j-api-1.7.2.jar:bin/../../..//lib/slf4j-log4j12-1.7.2.ja
r:bin/../../..//lib/snakeyaml-1.6.jar:bin/../../..//lib/snappy-java-1.0.4.1.
jar:bin/../../..//lib/snaptree-0.1.jar:bin/../../..//build/lib/jars/ant-1.6.
5.jar:bin/../../..//build/lib/jars/apache-rat-0.6.jar:bin/../../..//build/li
b/jars/apache-rat-core-0.6.jar:bin/../../..//build/lib/jars/apache-rat-tasks
-0.6.jar:bin/../../..//build/lib/jars/asm-3.2.jar:bin/../../..//build/lib/ja
rs/avro-1.3.2.jar:bin/../../..//build/lib/jars/commons-beanutils-1.7.0.jar:b
in/../../..//build/lib/jars/commons-beanutils-core-1.8.0.jar:bin/../../..//b
uild/lib/jars/commons-cli-1.2.jar:bin/../../..//build/lib/jars/commons-codec
-1.4.jar:bin/../../..//build/lib/jars/commons-collections-3.2.jar:bin/../../
..//build/lib/jars/commons-configuration-1.6.jar:bin/../../..//build/lib/jar
s/commons-digester-1.8.jar:bin/../../..//build/lib/jars/commons-el-1.0.jar:b
in/../../..//build/lib/jars/commons-httpclient-3.0.1.jar:bin/../../..//build
/lib/jars/commons-lang-2.4.jar:bin/../../..//build/lib/jars/commons-logging-
1.1.1.jar:bin/../../..//build/lib/jars/commons-math-2.1.jar:bin/../../..//bu
ild/lib/jars/commons-net-1.4.1.jar:bin/../../..//build/lib/jars/core-3.1.1.j
ar:bin/../../..//build/lib/jars/hadoop-core-1.0.3.jar:bin/../../..//build/li
b/jars/hsqldb-1.8.0.10.jar:bin/../../..//build/lib/jars/jackson-core-asl-1.0
.1.jar:bin/../../..//build/lib/jars/jackson-mapper-asl-1.0.1.jar:bin/../../.
.//build/lib/jars/jasper-compiler-5.5.12.jar:bin/../../..//build/lib/jars/ja
sper-runtime-5.5.12.jar:bin/../../..//build/lib/jars/jets3t-0.7.1.jar:bin/..
/../..//build/lib/jars/jetty-6.1.26.jar:bin/../../..//build/lib/jars/jetty-u
til-6.1.26.jar:bin/../../..//build/lib/jars/jna-3.2.7.jar:bin/../../..//buil
d/lib/jars/jopt-simple-3.2.jar:bin/../../..//build/lib/jars/jsp-2.1-6.1.14.j
ar:bin/../../..//build/lib/jars/jsp-api-2.1-6.1.14.jar:bin/../../..//build/l
ib/jars/junit-4.6.jar:bin/../../..//build/lib/jars/kfs-0.3.jar:bin/../../../
/build/lib/jars/oro-2.0.8.jar:bin/../../..//build/lib/jars/paranamer-2.2.jar
:bin/../../..//build/lib/jars/paranamer-ant-2.1.jar:bin/../../..//build/lib/
jars/paranamer-generator-2.1.jar:bin/../../..//build/lib/jars/pig-0.10.0.jar
:bin/../../..//build/lib/jars/qdox-1.10.jar:bin/../../..//build/lib/jars/ser
vlet-api-2.5-20081211.jar:bin/../../..//build/lib/jars/servlet-api-2.5-6.1.1
4.jar:bin/../../..//build/lib/jars/slf4j-api-1.5.11.jar:bin/../../..//build/
lib/jars/xmlenc-0.52.jar:bin/../../..//build/apache-cassandra-1.2.0-beta3-SN
APSHOT.jar:bin/../../..//build/apache-cassandra-clientutil-1.2.0-beta3-SNAPS
HOT.jar:bin/../../..//build/apache-cassandra-thrift-1.2.0-beta3-SNAPSHOT.jar
:/Library/pig-0.10.0/pig-0.10.0.jar:/Library/pig-0.10.0/bin/../lib/automaton
.jar:/Library/pig-0.10.0/bin/../lib/jython-2.5.0.jar:/Library/pig-0.10.0/bin
/../pig-0.10.0-withouthadoop.jar:
HADOOP_OPTS: -Xmx1000m  -Dudf.import.list=org.apache.cassandra.hadoop.pig
-Dpig.log.dir=/Library/pig-0.10.0/bin/../logs -Dpig.log.file=pig.log
-Dpig.home.dir=/Library/pig-0.10.0/bin/..
/Library/hadoop-1.0.2/bin/hadoop jar
/Library/pig-0.10.0/bin/../pig-0.10.0-withouthadoop.jar -x local
example-script.pig



Reply via email to