JSON error

51 views
Skip to first unread message

Joao Salcedo

unread,
Oct 23, 2012, 7:57:40 PM10/23/12
to elephant...@googlegroups.com
HI All, I have the following  .json file is {"a":"1", "b":"2", "c":3} . I compiled the code on a EC2 instance

And I have the following problem

Do you guys have any idea of what Iam doing wrong?


grunt> register file:/home/hadoop/json-simple-1.1.1.jar
grunt> register file:/home/hadoop/elephant-bird/pig/target/elephant-bird-pig-3.0.4-SNAPSHOT.jar;
grunt> raw_events = load 'hdfs://10.244.29.201:9000/user/hadoop/test/abc.json' using com.twitter.elephantbird.pig.load.JsonLoader() as (json:map[]);
grunt> illustrate raw_events;
2012-10-17 12:43:27,638 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://10.244.29.201:9000
2012-10-17 12:43:27,638 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: 10.244.29.201:9001
2012-10-17 12:43:28,002 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
2012-10-17 12:43:28,081 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 1
2012-10-17 12:43:28,081 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 1
2012-10-17 12:43:28,093 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2012-10-17 12:43:28,109 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2012-10-17 12:43:28,369 [main] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2012-10-17 12:43:28,442 [main] INFO com.hadoop.compression.lzo.GPLNativeCodeLoader - Loaded native gpl library
2012-10-17 12:43:28,445 [main] WARN com.hadoop.compression.lzo.LzoCodec - Could not find build properties file with revision hash
2012-10-17 12:43:28,445 [main] INFO com.hadoop.compression.lzo.LzoCodec - Successfully loaded & initialized native-lzo library [hadoop-lzo rev UNKNOWN]
2012-10-17 12:43:28,452 [main] WARN org.apache.hadoop.io.compress.snappy.LoadSnappy - Snappy native library is available
2012-10-17 12:43:28,452 [main] INFO org.apache.hadoop.io.compress.snappy.LoadSnappy - Snappy native library loaded
java.lang.NullPointerException
at org.apache.hadoop.mapreduce.TaskInputOutputContext.getCounter(TaskInputOutputContext.java:84)
at org.apache.pig.tools.pigstats.PigStatusReporter.getCounter(PigStatusReporter.java:55)
at com.twitter.elephantbird.pig.util.PigCounterHelper.incrCounter(PigCounterHelper.java:54)
at com.twitter.elephantbird.pig.load.LzoBaseLoadFunc.incrCounter(LzoBaseLoadFunc.java:70)
at com.twitter.elephantbird.pig.load.JsonLoader.getNext(JsonLoader.java:128)
at org.apache.pig.impl.io.ReadToEndLoader.getNextHelper(ReadToEndLoader.java:210)
at org.apache.pig.impl.io.ReadToEndLoader.getNext(ReadToEndLoader.java:190)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLoad.getNext(POLoad.java:129)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:267)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:262)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:64)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
at org.apache.pig.pen.LocalMapReduceSimulator.launchPig(LocalMapReduceSimulator.java:194)
at org.apache.pig.pen.ExampleGenerator.getData(ExampleGenerator.java:257)
at org.apache.pig.pen.ExampleGenerator.readBaseData(ExampleGenerator.java:222)
at org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:154)
at org.apache.pig.PigServer.getExamples(PigServer.java:1244)
at org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:722)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.java:591)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:306)
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.run(Grunt.java:69)
at org.apache.pig.Main.run(Main.java:500)
at org.apache.pig.Main.main(Main.java:114)
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:187)
2012-10-17 12:43:28,469 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Encountered IOException. Exception : null
Details at logfile: /home/hadoop/pig_1350477730383.log
grunt> quit
hadoop@ip-10-244-29-201:~$ less /home/hadoop/pig_1350477730383.log

Pig Stack Trace

ERROR 2997: Encountered IOException. Exception : null

java.io.IOException: Exception : null
at org.apache.pig.PigServer.getExamples(PigServer.java:1250)
at org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:722)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.java:591)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:306)
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.run(Grunt.java:69)
at org.apache.pig.Main.run(Main.java:500)
at org.apache.pig.Main.main(Main.java:114)
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:187)

Reply all
Reply to author
Forward
0 new messages