@InterfaceAudience.Public @InterfaceStability.Stable public abstract class CombineFileRecordReaderWrapper<K,V> extends Object implements RecordReader<K,V>
CombineFileRecordReader
.
Subclassing is needed to get a concrete record reader wrapper because of the
constructor requirement.CombineFileRecordReader
,
CombineFileInputFormat
Modifier | Constructor and Description |
---|---|
protected |
CombineFileRecordReaderWrapper(FileInputFormat<K,V> inputFormat,
CombineFileSplit split,
Configuration conf,
Reporter reporter,
Integer idx) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this
InputSplit to future operations. |
K |
createKey()
Create an object of the appropriate type to be used as a key.
|
V |
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(K key,
V value)
Reads the next key/value pair from the input for processing.
|
protected CombineFileRecordReaderWrapper(FileInputFormat<K,V> inputFormat, CombineFileSplit split, Configuration conf, Reporter reporter, Integer idx) throws IOException
IOException
public boolean next(K key, V value) throws IOException
RecordReader
next
in interface RecordReader<K,V>
key
- the key to read data intovalue
- the value to read data intoIOException
public K createKey()
RecordReader
createKey
in interface RecordReader<K,V>
public V createValue()
RecordReader
createValue
in interface RecordReader<K,V>
public long getPos() throws IOException
RecordReader
getPos
in interface RecordReader<K,V>
IOException
public void close() throws IOException
RecordReader
InputSplit
to future operations.close
in interface RecordReader<K,V>
IOException
public float getProgress() throws IOException
RecordReader
RecordReader
consumed i.e.
has been processed by?getProgress
in interface RecordReader<K,V>
0.0
to 1.0
.IOException
Copyright © 2018 Apache Software Foundation. All rights reserved.