|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.LineRecordReader
@InterfaceAudience.LimitedPrivate(value={"MapReduce","Pig"}) @InterfaceStability.Unstable public class LineRecordReader
Treats keys as offset in file and value as line.
Nested Class Summary | |
---|---|
static class |
LineRecordReader.LineReader
Deprecated. Use LineReader instead. |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineRecordReader(org.apache.hadoop.conf.Configuration job, FileSplit split) throws IOException
IOException
public LineRecordReader(org.apache.hadoop.conf.Configuration job, FileSplit split, byte[] recordDelimiter) throws IOException
IOException
public 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
IOException
public LineRecordReader(InputStream in, long offset, long endOffset, org.apache.hadoop.conf.Configuration job, byte[] recordDelimiter) throws IOException
IOException
Method Detail |
---|
public org.apache.hadoop.io.LongWritable createKey()
RecordReader
createKey
in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.Text createValue()
RecordReader
createValue
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 into
IOException
public float getProgress() throws IOException
getProgress
in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
0.0
to 1.0
.
IOException
public long getPos() throws IOException
RecordReader
getPos
in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
public void close() throws IOException
RecordReader
InputSplit
to future operations.
close
in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |