hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi P <hadoo...@outlook.com>
Subject How to convert Avro GenericRecord to AvroKey<GenericRecord>?
Date Wed, 26 Sep 2012 23:21:52 GMT
Hello,  I am using Avro files for Hadoop MaprReduce.  My Mapper function has following definition.
Mapper <AvroKey<GenericRecord>,NullWritable, AvroKey<GenericRecord>,AvroValue<GenericRecord>>
For writing unit tests for above Mapper function I need to pass AvroKey<GenericRecord>.
How do I convert GenericRecord to AvroKey<GenericRecord> ? 
Is there any example available ?
View raw message