|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.LineRecordReader
public class LineRecordReader
Treats keys as offset in file and value as line.
Constructor Summary | |
---|---|
LineRecordReader(Configuration job,
FileSplit split)
|
|
LineRecordReader(InputStream in,
long offset,
long endOffset)
|
Method Summary | |
---|---|
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. |
protected long |
readLine()
|
static long |
readLine(InputStream in,
OutputStream out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineRecordReader(Configuration job, FileSplit split) throws IOException
IOException
public LineRecordReader(InputStream in, long offset, long endOffset) throws IOException
IOException
Method Detail |
---|
public LongWritable createKey()
RecordReader
createKey
in interface RecordReader<LongWritable,Text>
public Text createValue()
RecordReader
createValue
in interface RecordReader<LongWritable,Text>
public boolean next(LongWritable key, Text value) throws IOException
next
in interface RecordReader<LongWritable,Text>
key
- the key to read data intovalue
- the value to read data into
IOException
Writable.readFields(DataInput)
protected long readLine() throws IOException
IOException
public static long readLine(InputStream in, OutputStream out) throws IOException
IOException
public float getProgress()
getProgress
in interface RecordReader<LongWritable,Text>
0.0
to 1.0
.public long getPos() throws IOException
RecordReader
getPos
in interface RecordReader<LongWritable,Text>
IOException
public void close() throws IOException
RecordReader
InputSplit
to future operations.
close
in interface RecordReader<LongWritable,Text>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |