You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Harsh J <ha...@cloudera.com> on 2014/02/27 15:32:22 UTC

Re: Multiple inputs for different avro inputs

> One more doubt: Why we don't have AvroMultipleInputs just like AvroMultipleOutputs? Any reason?

This (and other) question belongs to Apache Avro's list
(user@avro.apache.org). Moving user@hadoop to bcc:.

For AvroMultipleInputs, see https://issues.apache.org/jira/browse/AVRO-1439

On Thu, Feb 27, 2014 at 2:43 AM, AnilKumar B <ak...@gmail.com> wrote:
> Hi,
>
> I am using MultipleInputs to read two different avro inputs with different
> schemas.
>
> But in run method, as we need to specify the
> AvroJob.setInputKeySchema(job,schema),
>
> Which schema I need to set?
>
> I tried as below
>
>             List<Schema> schemas = new ArrayList<Schema>();
> schemas.add(FlumeEvent.SCHEMA$);
> schemas.add(Event.SCHEMA$);
> AvroJob.setInputKeySchema(testJob, Schema.createUnion(schemas));
>
> But I am facing issue while Map phase
> Error: org.apache.avro.AvroTypeException: Found Event, expecting union
>
> How to fix this issue?
>
> One more doubt: Why we don't have AvroMultipleInputs just like
> AvroMultipleOutputs? Any reason?
>
> Thanks & Regards,
> B Anil Kumar.



-- 
Harsh J