public class LineRecordReader extends RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Constructor and Description |
---|
LineRecordReader() |
LineRecordReader(byte[] recordDelimiter) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the record reader.
|
org.apache.hadoop.io.LongWritable |
getCurrentKey()
Get the current key
|
org.apache.hadoop.io.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 LineRecordReader()
public LineRecordReader(byte[] recordDelimiter)
public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws java.io.IOException
RecordReader
initialize
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
genericSplit
- the split that defines the range of records to readcontext
- the information about the taskjava.io.IOException
public boolean nextKeyValue() throws java.io.IOException
RecordReader
nextKeyValue
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
java.io.IOException
public org.apache.hadoop.io.LongWritable getCurrentKey()
RecordReader
getCurrentKey
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.Text getCurrentValue()
RecordReader
getCurrentValue
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public float getProgress()
getProgress
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public void close() throws java.io.IOException
RecordReader
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
java.io.IOException
Copyright © 2009 The Apache Software Foundation