不写,默认是下面的转换类
job.setInputFormatClass(TextInputFormat.class)

List<InputSplit> InputFormat.getSplits首先对输入的数据做切分,切分后的split书面决定map的任务数;

RecordReader<K,V> InputFormat.createRecordReader(InputSplit split, ...)传入切分的数据,处理成key、value,然后把keyvalue值送给map执行,每一对key、value对都会调用一次map;

FileInputFormat<K, V> extends InputFormat<K, V>

List<InputSplit> FileInputFormat.getSplits

hadoop散记

TextInputFormat extends FileInputFormat<LongWritable, Text>

hadoop散记

 

转载于:https://my.oschina.net/sniperLi/blog/359081

相关文章:

  • 2021-09-16
  • 2021-11-18
  • 2021-04-13
  • 2021-11-01
  • 2021-06-22
  • 2021-12-20
  • 2021-12-26
猜你喜欢
  • 2021-07-03
  • 2021-09-26
  • 2021-10-13
  • 2021-09-15
  • 2022-02-28
  • 2021-07-16
  • 2021-09-16
相关资源
相似解决方案