Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3940

NullPointerException writing .pig_header for field with null name (in JsonMetadata.java)

    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available
    • Release Note:
      Fixed NullPointerException writing schema headers for fields with null names. They are now written as '$i' corresponding to the field's zero-based position.

      Description

      Pig throws an NPE writing .pig_header for field with null name. Attached patch has it instead write field name as '$i' corresponding to the field's zero-based position – i.e., if the second field is unnamed, its header will be written as $1.

      Caused by: java.lang.NullPointerException
      	at org.apache.pig.builtin.JsonMetadata.storeSchema(JsonMetadata.java:319)
      	at org.apache.pig.builtin.PigStorage.storeSchema(PigStorage.java:578)
      	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.storeCleanup(PigOutputCommitter.java:144)
      

        Attachments

          Activity

            People

            • Assignee:
              mrflip Philip (flip) Kromer
              Reporter:
              mrflip Philip (flip) Kromer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: