|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
org.apache.hadoop.mapreduce.lib.input.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(int recordLength)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the record reader. |
org.apache.hadoop.io.LongWritable |
getCurrentKey()
Get the current key |
org.apache.hadoop.io.BytesWritable |
getCurrentValue()
Get the current value. |
long |
getPos()
|
float |
getProgress()
The current progress of the record reader through its data. |
void |
initialize(org.apache.hadoop.conf.Configuration job,
long splitStart,
long splitLength,
org.apache.hadoop.fs.Path file)
|
void |
initialize(InputSplit genericSplit,
TaskAttemptContext context)
Called once at initialization. |
boolean |
nextKeyValue()
Read the next key, value pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FixedLengthRecordReader(int recordLength)
| Method Detail |
|---|
public void initialize(InputSplit genericSplit,
TaskAttemptContext context)
throws IOException
RecordReader
initialize in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>genericSplit - the split that defines the range of records to readcontext - the information about the task
IOException
public void initialize(org.apache.hadoop.conf.Configuration job,
long splitStart,
long splitLength,
org.apache.hadoop.fs.Path file)
throws IOException
IOException
public boolean nextKeyValue()
throws IOException
RecordReader
nextKeyValue in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOExceptionpublic org.apache.hadoop.io.LongWritable getCurrentKey()
RecordReader
getCurrentKey in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>public org.apache.hadoop.io.BytesWritable getCurrentValue()
RecordReader
getCurrentValue in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
public float getProgress()
throws IOException
RecordReader
getProgress in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOException
public void close()
throws IOException
RecordReader
close in interface Closeableclose in class RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOExceptionpublic long getPos()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||