protected abstract static class AbstractInputFormat.AbstractRecordReader<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 |
AbstractRecordReader() |
| 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 abstract void |
setupIterators(org.apache.hadoop.mapred.JobConf job,
Scanner scanner,
String tableName,
RangeInputSplit split)
Configures the iterators on a scanner for the given table name.
|
protected long numKeysRead
protected RangeInputSplit split
protected Key currentKey
protected abstract void setupIterators(org.apache.hadoop.mapred.JobConf job,
Scanner scanner,
String tableName,
RangeInputSplit split)
job - the Hadoop job configurationscanner - the scanner for which to configure the iteratorstableName - the table name for which the scanner is configuredpublic 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.