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

Switch to Plain View
Avro, mail # user - Joining Avro and sequence File


Copy link to this message
-
Joining Avro and sequence File
Vignesh Srinivasan 2013-10-21, 21:01
Hi

I am trying to join a Avro file and a sequence file in hadoop. I tried
using MultipleInputs.

MultipleInputs.addInputPath(jobConf, new Path("avrofile"),
classOf[AvroInputFormat[AvroData]], classOf[AvroDataMapper])

MultipleInputs.addInputPath(jobConf, new Path("SeqFile"),
classOf[SequenceFileInputFormat[Text, Text]], classOf[SequenceMapper])

AvroJob.setInputSchema(jobConf, AvroData.getClassSchema)
Now I get the below error.

java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to
org.apache.avro.mapred.AvroWrapper

I think the error is because sequence file takes [Text,Text] as input. Not
sure how I could work this around. Any help will be highly appreciated.
thanks
 Vignesh