public class LineRecordReader extends Object implements RecordReader<LongWritable,Text>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
LineRecordReader.LineReader
已过时。
Use
LineReader instead. |
| 构造器和说明 |
|---|
LineRecordReader(Configuration job,
FileSplit split) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
Configuration job) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
int maxLineLength) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close this
InputSplit to future operations. |
LongWritable |
createKey()
Create an object of the appropriate type to be used as a key.
|
Text |
createValue()
Create an object of the appropriate type to be used as a value.
|
long |
getPos()
Returns the current position in the input.
|
float |
getProgress()
Get the progress within the split
|
boolean |
next(LongWritable key,
Text value)
Read a line.
|
public LineRecordReader(Configuration job, FileSplit split) throws IOException
IOExceptionpublic LineRecordReader(InputStream in, long offset, long endOffset, int maxLineLength)
public LineRecordReader(InputStream in, long offset, long endOffset, Configuration job) throws IOException
IOExceptionpublic LongWritable createKey()
RecordReadercreateKey 在接口中 RecordReader<LongWritable,Text>public Text createValue()
RecordReadercreateValue 在接口中 RecordReader<LongWritable,Text>public boolean next(LongWritable key, Text value) throws IOException
next 在接口中 RecordReader<LongWritable,Text>key - the key to read data intovalue - the value to read data intoIOExceptionpublic float getProgress()
throws IOException
getProgress 在接口中 RecordReader<LongWritable,Text>0.0 to 1.0.IOExceptionpublic long getPos()
throws IOException
RecordReadergetPos 在接口中 RecordReader<LongWritable,Text>IOExceptionpublic void close()
throws IOException
RecordReaderInputSplit to future operations.close 在接口中 RecordReader<LongWritable,Text>IOExceptionCopyright © 2009 The Apache Software Foundation