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

Allow AvroStorage to use a class for the schema

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.14.0
    • 0.16.0
    • None
    • None
    • Patch Available
    • Reviewed

    Description

      When you are managing Avro Schemas in your source code and you have the Java classes to serialize/deserialize Avro, it would be easier to do something like:

      store a into 'tmp/myuser' using AvroStorage(null, '-schemaclass com.myco.MyUser')

      Rather than passing as the first agurment, the entire Avro schema json in the pig script, or keeping a (potentially outdated) set of Avro schema files in HDFS for the -schemafile option.

      If your classpath is already aware of how to serialize/deserialize the Avro data, it would be good to leverage that with a fully qualified classname.

      Attachments

        1. PIG-4570.patch
          3 kB
          Paul Mazak
        2. PIG-4570_2.patch
          39 kB
          Paul Mazak

        Activity

          People

            pmazak Paul Mazak
            pmazak Paul Mazak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: