Uploaded image for project: 'HCatalog'
  1. HCatalog
  2. HCATALOG-163

NPE when illustrating a relation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.6
    • pig
    • None

    Description

      It seems that outputSchema hasn't been initialized while illustrating a relation in pig like below

      register lib/hive-common-0.7.1.jar;                                         
      register lib/hive-metastore-0.7.1.jar;
      register lib/libfb303.jar; 
      register lib/libthrift.jar;      
      register lib/hive-serde-0.7.1.jar; 
      register lib/hcatalog-0.2.0.jar;
      A = LOAD 'orders' USING org.apache.hcatalog.pig.HCatLoader();
      ILLUSTRATE A;
      

      so NPE would throw

      java.lang.NullPointerException
              at org.apache.hcatalog.pig.PigHCatUtil.transformToTuple(PigHCatUtil.java:274)
              at org.apache.hcatalog.pig.PigHCatUtil.transformToTuple(PigHCatUtil.java:238)
              at org.apache.hcatalog.pig.HCatBaseLoader.getNext(HCatBaseLoader.java:61)
              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:145)
              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:1245)
              at org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:698)
              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:188)
              at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:164)
              at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:67)
              at org.apache.pig.Main.run(Main.java:487)
              at org.apache.pig.Main.main(Main.java:108)
              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:165)
              at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
              at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
      

      Attachments

        1. HCATALOG-163-1.patch
          0.7 kB
          Daniel Dai

        Issue Links

          Activity

            People

              daijy Daniel Dai
              coderplay Min Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: