Avro
  1. Avro
  2. AVRO-1262

Provide access to the writer schema from the mapper

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.4
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None

      Description

      When using an Avro InputFormat like AvroKeyInputFormat, the writer schema of the container file should be accessible from the mapper. This is useful in cases where a reader schema is not specified.

      A workaround is to use FileSplit#getPath() to access the container file and manually pull out the schema. This workaround is not ideal because internally the writer schema has already been read (see AvroRecordReaderBase#createAvroFileReader(...)) - it is awkward and inefficient for the user to repeat this work.

      See also:
      http://mail-archives.apache.org/mod_mbox/avro-user/201302.mbox/%3CCAOF3b61nFw4ztOo9Q5pHHtoUDFZ3sRrvEdRGbXGV_cscTqd5LA%40mail.gmail.com%3E

      1. AVRO-1262.patch
        3 kB
        Doug Cutting

        Activity

        Doug Cutting made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Fix Version/s 1.7.5 [ 12324096 ]
        Doug Cutting made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Doug Cutting [ cutting ]
        Fix Version/s 1.7.5 [ 12324096 ]
        Doug Cutting made changes -
        Field Original Value New Value
        Attachment AVRO-1262.patch [ 12571671 ]
        Josh Spiegel created issue -

          People

          • Assignee:
            Doug Cutting
            Reporter:
            Josh Spiegel
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development