不写,默认是下面的转换类
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

相关文章:

猜你喜欢
相关资源
相似解决方案