org.apache.accumulo.core.client.mapreduce
Class InputFormatBase.RecordReaderBase<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,V>
      extended by org.apache.accumulo.core.client.mapreduce.InputFormatBase.RecordReaderBase<K,V>
All Implemented Interfaces:
Closeable
Enclosing class:
InputFormatBase<K,V>

protected abstract static class InputFormatBase.RecordReaderBase<K,V>
extends org.apache.hadoop.mapreduce.RecordReader<K,V>


Field Summary
protected  K currentK
           
protected  Key currentKey
           
protected  V currentV
           
protected  Value currentValue
           
protected  long numKeysRead
           
protected  Iterator<Map.Entry<Key,Value>> scannerIterator
           
protected  RangeInputSplit split
           
 
Constructor Summary
protected InputFormatBase.RecordReaderBase()
           
 
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  void setupIterators(Scanner scanner, List<org.apache.accumulo.core.client.mapreduce.InputFormatBase.AccumuloIterator> iterators, List<org.apache.accumulo.core.client.mapreduce.InputFormatBase.AccumuloIteratorOption> options)
          Apply the configured iterators from the configuration to the scanner.
protected  void setupMaxVersions(Scanner scanner, int maxVersions)
          If maxVersions has been set, configure a VersioningIterator at priority 0 for this scanner.
protected  boolean setupRegex(org.apache.hadoop.mapreduce.TaskAttemptContext attempt, Scanner scanner)
          Deprecated. since 1.4, configure RegExFilter instead.
 
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

numKeysRead

protected long numKeysRead

scannerIterator

protected Iterator<Map.Entry<Key,Value>> scannerIterator

split

protected RangeInputSplit split

currentK

protected K currentK

currentV

protected V currentV

currentKey

protected Key currentKey

currentValue

protected Value currentValue
Constructor Detail

InputFormatBase.RecordReaderBase

protected InputFormatBase.RecordReaderBase()
Method Detail

setupRegex

@Deprecated
protected boolean setupRegex(org.apache.hadoop.mapreduce.TaskAttemptContext attempt,
                                        Scanner scanner)
                      throws AccumuloException
Deprecated. since 1.4, configure RegExFilter instead.

Throws:
AccumuloException

setupIterators

protected void setupIterators(Scanner scanner,
                              List<org.apache.accumulo.core.client.mapreduce.InputFormatBase.AccumuloIterator> iterators,
                              List<org.apache.accumulo.core.client.mapreduce.InputFormatBase.AccumuloIteratorOption> options)
                       throws AccumuloException
Apply the configured iterators from the configuration to the scanner.

Parameters:
scanner - the scanner to configure
iterators - the iterators to configure on the scanner
options - options for each configured iterator
Throws:
AccumuloException

setupMaxVersions

protected void setupMaxVersions(Scanner scanner,
                                int maxVersions)
If maxVersions has been set, configure a VersioningIterator at priority 0 for this scanner.

Parameters:
scanner - the scanner to configure
maxVersions - the number of versions to return

initialize

public void initialize(org.apache.hadoop.mapreduce.InputSplit inSplit,
                       org.apache.hadoop.mapreduce.TaskAttemptContext attempt)
                throws IOException
Initialize a scanner over the given input split using this task attempt configuration.

Specified by:
initialize in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException

close

public void close()
Specified by:
close in interface Closeable
Specified by:
close in class org.apache.hadoop.mapreduce.RecordReader<K,V>

getProgress

public float getProgress()
                  throws IOException
Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException

getCurrentKey

public K getCurrentKey()
                throws IOException,
                       InterruptedException
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

getCurrentValue

public V getCurrentValue()
                  throws IOException,
                         InterruptedException
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.