@InterfaceAudience.LimitedPrivate(value={"MapReduce","Pig"})
@InterfaceStability.Evolving
public class LineRecordReader
extends RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
| Modifier and Type | Field and Description |
|---|---|
static String |
MAX_LINE_LENGTH |
| 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 static final String MAX_LINE_LENGTH
public LineRecordReader()
public LineRecordReader(byte[] recordDelimiter)
public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException
RecordReaderinitialize 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 taskIOExceptionpublic boolean nextKeyValue()
throws IOException
RecordReadernextKeyValue in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionpublic org.apache.hadoop.io.LongWritable getCurrentKey()
RecordReadergetCurrentKey in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>public org.apache.hadoop.io.Text getCurrentValue()
RecordReadergetCurrentValue in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>public float getProgress()
throws IOException
getProgress in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionpublic void close()
throws IOException
RecordReaderclose in interface Closeableclose in interface AutoCloseableclose in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.