|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.RecordReader<K,V> org.apache.accumulo.core.client.mapreduce.AbstractInputFormat.AbstractRecordReader<K,V>
protected abstract static class AbstractInputFormat.AbstractRecordReader<K,V>
An abstract base class to be used to create RecordReader
instances that convert from Accumulo
Key
/Value
pairs to the user's K/V types.
Subclasses must implement RecordReader.nextKeyValue()
and use it to update the following variables:
currentK
currentV
currentKey
(used for progress reporting)numKeysRead
(used for progress reporting)
Field Summary | |
---|---|
protected K |
currentK
The Key that should be returned to the client |
protected Key |
currentKey
The Key that is used to determine progress in the current InputSplit. |
protected V |
currentV
The Value that should be return to the client |
protected long |
numKeysRead
|
protected Iterator<Map.Entry<Key,Value>> |
scannerIterator
|
protected RangeInputSplit |
split
|
Constructor Summary | |
---|---|
protected |
AbstractInputFormat.AbstractRecordReader()
|
Method Summary | |
---|---|
void |
close()
|
K |
getCurrentKey()
|
V |
getCurrentValue()
|
float |
getProgress()
|
void |
initialize(org.apache.hadoop.mapreduce.InputSplit inSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext attempt)
Initialize a scanner over the given input split using this task attempt configuration. |
protected abstract void |
setupIterators(org.apache.hadoop.mapreduce.TaskAttemptContext context,
Scanner scanner,
String tableName,
RangeInputSplit split)
Configures the iterators on a scanner for the given table name. |
Methods inherited from class org.apache.hadoop.mapreduce.RecordReader |
---|
nextKeyValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long numKeysRead
protected Iterator<Map.Entry<Key,Value>> scannerIterator
protected RangeInputSplit split
protected K currentK
protected V currentV
protected Key currentKey
Constructor Detail |
---|
protected AbstractInputFormat.AbstractRecordReader()
Method Detail |
---|
protected abstract void setupIterators(org.apache.hadoop.mapreduce.TaskAttemptContext context, Scanner scanner, String tableName, RangeInputSplit split)
context
- the Hadoop context for the configured jobscanner
- the scanner for which to configure the iteratorstableName
- the table name for which the scanner is configuredpublic void initialize(org.apache.hadoop.mapreduce.InputSplit inSplit, org.apache.hadoop.mapreduce.TaskAttemptContext attempt) throws IOException
initialize
in class org.apache.hadoop.mapreduce.RecordReader<K,V>
IOException
public void close()
close
in interface Closeable
close
in class org.apache.hadoop.mapreduce.RecordReader<K,V>
public float getProgress() throws IOException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<K,V>
IOException
public K getCurrentKey() throws IOException, InterruptedException
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<K,V>
IOException
InterruptedException
public V getCurrentValue() throws IOException, InterruptedException
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<K,V>
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |