@InterfaceAudience.LimitedPrivate(value={"MapReduce","Pig"})
@InterfaceStability.Unstable
public class LineRecordReader
extends Object
implements RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
| Modifier and Type | Class and Description |
|---|---|
static class |
LineRecordReader.LineReader
Deprecated.
Use
LineReader instead. |
| Constructor and Description |
|---|
LineRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split) |
LineRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
byte[] recordDelimiter) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
org.apache.hadoop.conf.Configuration job) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
org.apache.hadoop.conf.Configuration job,
byte[] recordDelimiter) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
int maxLineLength) |
LineRecordReader(InputStream in,
long offset,
long endOffset,
int maxLineLength,
byte[] recordDelimiter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this
InputSplit to future operations. |
org.apache.hadoop.io.LongWritable |
createKey()
Create an object of the appropriate type to be used as a key.
|
org.apache.hadoop.io.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(org.apache.hadoop.io.LongWritable key,
org.apache.hadoop.io.Text value)
Read a line.
|
public LineRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split)
throws IOException
IOExceptionpublic LineRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
byte[] recordDelimiter)
throws IOException
IOExceptionpublic LineRecordReader(InputStream in, long offset, long endOffset, int maxLineLength)
public LineRecordReader(InputStream in, long offset, long endOffset, int maxLineLength, byte[] recordDelimiter)
public LineRecordReader(InputStream in, long offset, long endOffset, org.apache.hadoop.conf.Configuration job) throws IOException
IOExceptionpublic LineRecordReader(InputStream in, long offset, long endOffset, org.apache.hadoop.conf.Configuration job, byte[] recordDelimiter) throws IOException
IOExceptionpublic org.apache.hadoop.io.LongWritable createKey()
RecordReadercreateKey in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>public org.apache.hadoop.io.Text createValue()
RecordReadercreateValue in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>public boolean next(org.apache.hadoop.io.LongWritable key,
org.apache.hadoop.io.Text value)
throws IOException
next in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>key - the key to read data intovalue - the value to read data intoIOExceptionpublic float getProgress()
throws IOException
getProgress in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>0.0 to 1.0.IOExceptionpublic long getPos()
throws IOException
RecordReadergetPos in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionpublic void close()
throws IOException
RecordReaderInputSplit to future operations.close in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.