You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Nishanth S <ch...@gmail.com> on 2015/05/01 19:30:40 UTC

(Unknown)

Hello All,

I am  looking to write a map only program in java .The output of which are
two avro files.There  can  be two types of records in the input file(let us
say lion and tiger) and based on an identifier they are processed and
 written to  two different avro files using  'AvroMultipleOutputs'.


The map function would look like

public static class CustomMapper extends
      Mapper<AvroKey< ?>, NullWritable, Text, IntWritable>


I would need to write a map function that can process lion and tiger
records?What would be the best approach to do this?.

Can  I  sub class schemas?
Expicitly add an 'Animal' interface to the  generated Avro  class?

I request some help on this.

Regards,
Chinchu