Hadoop 源码详解之RecordReader接口
1. 类释义
RecordReader reads <key, value> pairs from an InputSplit.
RecordReader从InputSplit中读取<key,value> pairs 。
RecordReader, typically, converts the byte-oriented view of the input, provided by the InputSplit, and presents a record-oriented view for the Mapper and Reducer tasks for processing. It thus assumes the responsibility of processing record boundaries and presenting the tasks with keys and values.
RecordReader转换输入面向字节的视图,由InputSplit提供,并且展示一个面向记录的视图给Mapper以及Reducer任务从而进行处理。它承担处理记录边界并且使用keys 和 values展示任务的责任。
2. 源码
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class RecordReader<KEYIN, VALUEIN> implements Closeable {
...
}
3. 方法详解

本文深入探讨了Hadoop中RecordReader接口的作用与实现原理。RecordReader负责从InputSplit读取<key,value>对,将输入的字节流转换为面向记录的视图供Mapper和Reducer处理,承担处理记录边界的职责。
6777

被折叠的 条评论
为什么被折叠?



