Avro 提供了1.x版本的AvroMultipleInputs,但是不支持2.x API版本,因此修改对应代码,增加对hadoop 2.x API版本的的支持

代码放在https://github.com/jadepeng/AvroMultipleInputs/

使用方法和MultipleInputs类似,指定inputpath,key和value的SCHEMA,以及处理用的Mapper类即可

AvroMultipleInputs.addInputPath(job, new Path(inputPath),Schema.create(Schema.Type.STRING), 
						SingerItem.SCHEMA$, SingerItemMapper.class);

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-12-25
  • 2022-12-23
  • 2021-06-08
  • 2021-07-29
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2021-11-11
  • 2022-01-14
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案