Class AbstractInputFormat.AbstractRecordReader<K,​V>

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.hadoop.mapred.RecordReader<K,​V>
    Direct Known Subclasses:
    InputFormatBase.RecordReaderBase
    Enclosing class:
    AbstractInputFormat<K,​V>

    protected abstract static class AbstractInputFormat.AbstractRecordReader<K,​V>
    extends Object
    implements org.apache.hadoop.mapred.RecordReader<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.next(Object, Object) to update key and value, and also to update the following variables:
    • Constructor Detail

      • AbstractRecordReader

        protected AbstractRecordReader()
    • Method Detail

      • jobIterators

        protected abstract List<IteratorSetting> jobIterators​(org.apache.hadoop.mapred.JobConf job,
                                                              String tableName)
        Extracts Iterators settings from the context to be used by RecordReader.
        Parameters:
        job - the Hadoop job configuration
        tableName - the table name for which the scanner is configured
        Returns:
        List of iterator settings for given table
        Since:
        1.7.0
      • initialize

        public void initialize​(org.apache.hadoop.mapred.InputSplit inSplit,
                               org.apache.hadoop.mapred.JobConf job)
                        throws IOException
        Initialize a scanner over the given input split using this task attempt configuration.
        Throws:
        IOException
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.apache.hadoop.mapred.RecordReader<K,​V>
      • getPos

        public long getPos()
                    throws IOException
        Specified by:
        getPos in interface org.apache.hadoop.mapred.RecordReader<K,​V>
        Throws:
        IOException
      • getProgress

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