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

Problem in org.apache.pig.piggybank.storage.avro.AvroStorage when storing a record with a single field.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.0
    • None
    • piggybank
    • None
    • Patch Available

    Description

      Running the following script yields a RuntimeException. If the schema is changed to contain two fields, then A can be stored successfully.

      REGISTER 'piggybank.jar'
      REGISTER 'avro-1.5.4.jar'
      REGISTER 'json-simple-1.1.jar'
      
      A = load 'input.txt' AS (name1:chararray, name2:chararray);
      B = foreach A generate $0;
      store B into './output' using org.apache.pig.piggybank.storage.avro.AvroStorage(
      '{"schema": {"type": "record", "name": "main", "fields": [{"name": "name", "type": ["null", "string"]}]}}');
      

      Attachments

        1. AvroStorage.patch
          0.5 kB
          Stan Rosenberg
        2. input.txt
          0.0 kB
          Stan Rosenberg

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srosenberg Stan Rosenberg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: