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 ScannerBase |
scannerBase |
protected Iterator<Map.Entry<Key,Value>> |
scannerIterator |
protected RangeInputSplit |
split |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractInputFormat.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 List<IteratorSetting> |
jobIterators(org.apache.hadoop.mapred.JobConf job,
String tableName)
Extracts Iterators settings from the context to be used by RecordReader.
|
protected void |
setupIterators(org.apache.hadoop.mapred.JobConf job,
Scanner scanner,
String tableName,
RangeInputSplit split)
Deprecated.
since 1.7.0; Use
jobIterators(org.apache.hadoop.mapred.JobConf, java.lang.String) instead. |
protected long numKeysRead
protected RangeInputSplit split
protected ScannerBase scannerBase
protected Key currentKey
protected AbstractInputFormat.AbstractRecordReader()
protected abstract List<IteratorSetting> jobIterators(org.apache.hadoop.mapred.JobConf job, String tableName)
job - the Hadoop job configurationtableName - the table name for which the scanner is configured@Deprecated protected void setupIterators(org.apache.hadoop.mapred.JobConf job, Scanner scanner, String tableName, RangeInputSplit split)
jobIterators(org.apache.hadoop.mapred.JobConf, java.lang.String) instead.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–2017 The Apache Software Foundation. All rights reserved.