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

Switch to Plain View
Avro, mail # user - How to convert Generic Record to AvroKey<GenericRecord>


Copy link to this message
-
How to convert Generic Record to AvroKey<GenericRecord>
Ravi P 2012-09-26, 23:18
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 ?
Thanks,Ravi