1. 程式人生 > >Hadoop 原始碼詳解之RecordReader介面

Hadoop 原始碼詳解之RecordReader介面

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. 方法詳解

在這裡插入圖片描述