RecordReaders的概念

时间:2015-10-27 09:05:48

标签: hadoop mapreduce recordreader

我们知道在Mapper阶段之前,文件被拆分,RecordReader开始工作以向Mapper发出输入。我的问题是reducer是否使用RecordReader类来读取映射器发出的数据?

因为减速器也需要输入!! 请解释!!!

1 个答案:

答案 0 :(得分:1)

mapreduce步骤概述如下

1) InputFormat :

 - Validates the Input.

 - Splits the input files.        

 - Gives Record Reader Implementation to give input to Mapper.

2)Mapper Phase

3)Shuffle and Sort Phase

4)Reducer Phase

5) OutputFormat     

 - Validates the Output Specification.  

 - Provides Record Writer Implementation used to write the output files.

Reducer不使用记录阅读器...