Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> GenericRecord and passivity


Copy link to this message
-
Re: GenericRecord and passivity
On Tue, Oct 15, 2013 at 4:49 PM, Eric Wasserman <[EMAIL PROTECTED]> wrote:
> Change this line:
> DatumReader<GenericRecord> reader = new
> GenericDatumReader<GenericRecord>(schema_11);
>
> to this:
> DatumReader<GenericRecord> reader = new
> GenericDatumReader<GenericRecord>(schema_10,  schema_11);

Yes, that is the fix.

Or, better yet, use DataFileWriter & DataFileReader, which handle this for you.

Doug