Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB