public class LineRecordReader extends RecordReader<LongWritable,Text>
| 构造器和说明 |
|---|
LineRecordReader() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the record reader.
|
LongWritable |
getCurrentKey()
Get the current key
|
Text |
getCurrentValue()
Get the current value.
|
float |
getProgress()
Get the progress within the split
|
void |
initialize(InputSplit genericSplit,
TaskAttemptContext context)
Called once at initialization.
|
boolean |
nextKeyValue()
Read the next key, value pair.
|
public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException
RecordReaderinitialize 在类中 RecordReader<LongWritable,Text>genericSplit - the split that defines the range of records to readcontext - the information about the taskIOExceptionpublic boolean nextKeyValue()
throws IOException
RecordReadernextKeyValue 在类中 RecordReader<LongWritable,Text>IOExceptionpublic LongWritable getCurrentKey()
RecordReadergetCurrentKey 在类中 RecordReader<LongWritable,Text>public Text getCurrentValue()
RecordReadergetCurrentValue 在类中 RecordReader<LongWritable,Text>public float getProgress()
throws IOException
getProgress 在类中 RecordReader<LongWritable,Text>IOExceptionpublic void close()
throws IOException
RecordReaderclose 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RecordReader<LongWritable,Text>IOExceptionCopyright © 2009 The Apache Software Foundation