protected abstract static class InputFormatBase.RecordReaderBase<K,V> extends Object implements org.apache.hadoop.mapred.RecordReader<K,V>
RecordReader instances that convert from Accumulo Key/Value pairs to the user's K/V
types.
Subclasses must implement RecordReader.next(Object, Object) to update key and value, and also to update the following variables:
currentKey (used for progress reporting)numKeysRead (used for progress reporting)| Modifier and Type | Field and Description |
|---|---|
protected Key |
currentKey |
protected long |
numKeysRead |
protected Iterator<Map.Entry<Key,Value>> |
scannerIterator |
protected RangeInputSplit |
split |
| Modifier | Constructor and Description |
|---|---|
protected |
InputFormatBase.RecordReaderBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPos() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapred.InputSplit inSplit,
org.apache.hadoop.mapred.JobConf job)
Initialize a scanner over the given input split using this task attempt configuration.
|
protected void |
setupIterators(org.apache.hadoop.mapred.JobConf job,
Scanner scanner)
Apply the configured iterators from the configuration to the scanner.
|
protected void |
setupIterators(List<IteratorSetting> iterators,
Scanner scanner)
Apply the configured iterators to the scanner.
|
protected long numKeysRead
protected RangeInputSplit split
protected Key currentKey
protected void setupIterators(List<IteratorSetting> iterators, Scanner scanner)
iterators - the iterators to setscanner - the scanner to configureprotected void setupIterators(org.apache.hadoop.mapred.JobConf job,
Scanner scanner)
job - the job configurationscanner - the scanner to configurepublic void initialize(org.apache.hadoop.mapred.InputSplit inSplit,
org.apache.hadoop.mapred.JobConf job)
throws IOException
IOExceptionpublic void close()
public long getPos()
throws IOException
getPos in interface org.apache.hadoop.mapred.RecordReader<K,V>IOExceptionpublic float getProgress()
throws IOException
getProgress in interface org.apache.hadoop.mapred.RecordReader<K,V>IOExceptionCopyright © 2011-2016 The Apache Software Foundation. All Rights Reserved.