Hadoop 原始碼詳解之RecordReader介面
阿新 • • 發佈:2018-12-27
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 {
...
}