org.apache.avro.mapreduce

## Class AvroSequenceFileInputFormat.AvroSequenceFileRecordReader

- java.lang.Object
- - org.apache.hadoop.mapreduce.RecordReader<K,V>
  - - org.apache.avro.mapreduce.AvroSequenceFileInputFormat.AvroSequenceFileRecordReader

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Enclosing class:
    AvroSequenceFileInputFormat<K,V>

      protected class AvroSequenceFileInputFormat.AvroSequenceFileRecordReader
      extends RecordReader<K,V>

  Reads records from a SequenceFile that supports Avro data.

  This class is based on Hadoop's SequenceFileRecordReader, modified to construct an AvroSequenceFile.Reader instead of a SequenceFile.Reader.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AvroSequenceFileRecordReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `K` | `getCurrentKey()`
    `V` | `getCurrentValue()`
    `float` | `getProgress()`
    `void` | `initialize(InputSplit split, TaskAttemptContext context)`
    `boolean` | `nextKeyValue()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AvroSequenceFileRecordReader

          protected AvroSequenceFileRecordReader()

  - ### Method Detail

    - #### initialize

          public void initialize(InputSplit split,
                                 TaskAttemptContext context)
                          throws IOException,
                                 InterruptedException

      Specified by:
        `initialize` in class `RecordReader<K,V>`
      Throws:
        `IOException`
        `InterruptedException`

    - #### nextKeyValue

          public boolean nextKeyValue()
                               throws IOException,
                                      InterruptedException

      Specified by:
        `nextKeyValue` in class `RecordReader<K,V>`
      Throws:
        `IOException`
        `InterruptedException`

    - #### getCurrentKey

          public K getCurrentKey()

      Specified by:
        `getCurrentKey` in class `RecordReader<K,V>`

    - #### getCurrentValue

          public V getCurrentValue()

      Specified by:
        `getCurrentValue` in class `RecordReader<K,V>`

    - #### getProgress

          public float getProgress()
                            throws IOException

      Specified by:
        `getProgress` in class `RecordReader<K,V>`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in class `RecordReader<K,V>`
      Throws:
        `IOException`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.