avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Avro enum and passivity.
Date Tue, 16 Jul 2013 18:09:39 GMT
On Mon, Jul 15, 2013 at 6:26 PM, Koduri,Vinay <Vinay.Koduri@cerner.com> wrote:
> We are relying on a inhouse framework that uses
> SpecificDatumReader(writternSchema, readerSchema) to read our avro objects
> from underlying store.

It occurs to me that all you really need to do is override
SpecificDatumReader#readEnum() to return null when the enum symbol is
not in the enum.

Perhaps you can change your in-house framework to, instead of
hardwiring SpecificDatumReader, to accept a GenericData instance and
call its createDatumReader() method.  The default would be to use

Then you could pass your own subclass of SpecificData that returns a
subclass of SpecificDatumReader that overrides readEnum().


View raw message