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

Switch to Threaded View
Avro >> mail # user >> Joining Avro and sequence File

Copy link to this message
Joining Avro and sequence File

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

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.