0
点赞
收藏
分享

微信扫一扫

Hadoop 源码详解之RecordReader接口

老王420 2022-01-26 阅读 64
hadoopide


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接口_hadoop



举报

相关推荐

0 条评论