|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.FixedLengthRecordReader
@InterfaceAudience.Private @InterfaceStability.Evolving public class FixedLengthRecordReader
A reader to read fixed length records from a split. Record offset is returned as key and the record as bytes is returned in value.
| Constructor Summary | |
|---|---|
FixedLengthRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
int recordLength)
|
|
| 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.BytesWritable |
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()
How much of the input has the RecordReader consumed i.e. |
boolean |
next(org.apache.hadoop.io.LongWritable key,
org.apache.hadoop.io.BytesWritable value)
Reads the next key/value pair from the input for processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FixedLengthRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
int recordLength)
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.BytesWritable>public org.apache.hadoop.io.BytesWritable createValue()
RecordReader
createValue in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
public boolean next(org.apache.hadoop.io.LongWritable key,
org.apache.hadoop.io.BytesWritable value)
throws IOException
RecordReader
next in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>key - the key to read data intovalue - the value to read data into
IOException
public float getProgress()
throws IOException
RecordReaderRecordReader consumed i.e.
has been processed by?
getProgress in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>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.BytesWritable>IOException
public void close()
throws IOException
RecordReaderInputSplit to future operations.
close in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||