@InterfaceAudience.Private @InterfaceStability.Evolving public class FixedLengthRecordReader extends Object implements RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
| Constructor and Description |
|---|
FixedLengthRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
int recordLength) |
| 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.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.
|
public FixedLengthRecordReader(org.apache.hadoop.conf.Configuration job,
FileSplit split,
int recordLength)
throws IOException
IOExceptionpublic org.apache.hadoop.io.LongWritable createKey()
RecordReadercreateKey in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>public org.apache.hadoop.io.BytesWritable createValue()
RecordReadercreateValue 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
RecordReadernext 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 intoIOExceptionpublic 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.IOExceptionpublic long getPos()
throws IOException
RecordReadergetPos in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOExceptionpublic void close()
throws IOException
RecordReaderInputSplit to future operations.close in interface Closeableclose in interface AutoCloseableclose in interface RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>IOExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.