avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wilkes <cwil...@gmail.com>
Subject Re: Avro versioning and SpecificDatum's
Date Mon, 19 Sep 2011 15:22:56 GMT
I'm interested in this as well, for now I've put my versioning in the
package namespace of avro definition, ie:
After all my documents that had the v1.Car have been reprocessed and
are out of use I delete the old definition.


On Mon, Sep 19, 2011 at 5:12 AM, Alex Holmes <grep.alex@gmail.com> wrote:
> Hi,
> I'm starting to play with how I can support versioning with Avro.  I
> created an initial schema, code-generated some some Java classes using
> "org.apache.avro.tool.Main compile protocol", and then used the
> DataFileWriter (with a SpecificDatumWriter) to serialize my objects to
> a file.
> I then modified my original schema by adding, deleting and renaming
> some fields, creating version 2 of the schema.  After re-creating the
> Java classes I attempted to read the version 1 file using the
> DataFileStream (with a SpecificDatumReader), and this is throwing an
> exception.
> Is versioning supported in conjunction with the SpecificDatum*
> reader/writer classes, or do I have to work at the GenericDatum level
> for this to work?
> Many thanks,
> Alex

View raw message