there is about 3 checks that should have caught the Null. 

>         at 
> org.apache.cassandra.hadoop.ConfigHelper.getInputSlicePredicate(ConfigHelper.java:176)
This line does not match the source code for the 1.2.0-beta3 tag.

Can you try it with the 1.1.7 bin distro ? 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 13/12/2012, at 6:04 AM, James Schappet <jschap...@gmail.com> wrote:

> 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.java:206)
>         at 
> org.apache.cassandra.hadoop.ConfigHelper.getInputSlicePredicate(ConfigHelper.java:176)
>         at 
> org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:577)
>         at 
> org.apache.cassandra.hadoop.pig.CassandraStorage.getSchema(CassandraStorage.java:610)
>         at 
> org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:151)
>         at 
> org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.alias_col_ref(LogicalPlanGenerator.java:15356)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.col_ref(LogicalPlanGenerator.java:15203)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.projectable_expr(LogicalPlanGenerator.java:8881)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.var_expr(LogicalPlanGenerator.java:8632)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.expr(LogicalPlanGenerator.java:7984)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.flatten_clause(LogicalPlanGenerator.java:6103)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.flatten_generated_item(LogicalPlanGenerator.java:5926)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.generate_clause(LogicalPlanGenerator.java:14101)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.foreach_plan(LogicalPlanGenerator.java:12493)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.foreach_clause(LogicalPlanGenerator.java:12360)
>         at 
> org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1577)
>         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
> ================================================================================
> 
> 
> 
> 
> 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:bin/../../..//lib/commons-lang-2.6.jar:bin/../../..//lib/compress-lzf-0.8.4.jar:bin/../../..//lib/concurrentlinkedhashmap-lru-1.3.jar:bin/../../..//lib/guava-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:bin/../../..//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:bin/../../..//lib/slf4j-api-1.7.2.jar:bin/../../..//lib/slf4j-log4j12-1.7.2.jar: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/lib/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/jars/avro-1.3.2.jar:bin/../../..//build/lib/jars/commons-beanutils-1.7.0.jar:bin/../../..//build/lib/jars/commons-beanutils-core-1.8.0.jar:bin/../../..//build/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/jars/commons-digester-1.8.jar:bin/../../..//build/lib/jars/commons-el-1.0.jar:bin/../../..//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/../../..//build/lib/jars/commons-net-1.4.1.jar:bin/../../..//build/lib/jars/core-3.1.1.jar:bin/../../..//build/lib/jars/hadoop-core-1.0.3.jar:bin/../../..//build/lib/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/jasper-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-util-6.1.26.jar:bin/../../..//build/lib/jars/jna-3.2.7.jar:bin/../../..//build/lib/jars/jopt-simple-3.2.jar:bin/../../..//build/lib/jars/jsp-2.1-6.1.14.jar:bin/../../..//build/lib/jars/jsp-api-2.1-6.1.14.jar:bin/../../..//build/lib/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/servlet-api-2.5-20081211.jar:bin/../../..//build/lib/jars/servlet-api-2.5-6.1.14.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-SNAPSHOT.jar:bin/../../..//build/apache-cassandra-clientutil-1.2.0-beta3-SNAPSHOT.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