On 12/08/2011 04:10 AM, Andrew Kenworthy wrote:
> is it possible to write/collect a union-ed record from an avro reducer?
> 
> I have a reduce class (extending AvroReducer), and the output schema is
> a union schema of record type A and record type B. In the reduce logic I
> want to combine instances of A and B in the same datum, passing it to my
> Avrocollector.

I think you mean you want to pass instances of either A or B to the
collector, right?  With a union of A and B, you should be able to just:

  collector.collect(recordA);

or

  collector.collect(recordB);

Does this not work for you?

Doug

Reply via email to