RecordReader (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc

## Interface RecordReader

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Implementing Classes:
    RecordReaderImpl

      public interface RecordReader
      extends Closeable

  A row-by-row iterator for ORC files.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Release the resources associated with the given reader.
    `float` | `getProgress()` Get the progress of the reader through the rows.
    `long` | `getRowNumber()` Get the row number of the row that will be returned by the following call to next().
    `boolean` | `nextBatch(VectorizedRowBatch batch)` Read the next row batch.
    `void` | `seekToRow(long rowCount)` Seek to a particular row number.

- - ### Method Detail

    - #### nextBatch

          boolean nextBatch(VectorizedRowBatch batch)
                     throws IOException

      Read the next row batch. The size of the batch to read cannot be controlled by the callers. Caller need to look at VectorizedRowBatch.size of the retunred object to know the batch size read.
      Parameters:
        `batch` - a row batch object to read into
      Returns:
        were more rows available to read?
      Throws:
        `IOException`

    - #### getRowNumber

          long getRowNumber()
                     throws IOException

      Get the row number of the row that will be returned by the following call to next().
      Returns:
        the row number from 0 to the number of rows in the file
      Throws:
        `IOException`

    - #### getProgress

          float getProgress()
                     throws IOException

      Get the progress of the reader through the rows.
      Returns:
        a fraction between 0.0 and 1.0 of rows read
      Throws:
        `IOException`

    - #### close

          void close()
              throws IOException

      Release the resources associated with the given reader.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`
      Throws:
        `IOException`

    - #### seekToRow

          void seekToRow(long rowCount)
                  throws IOException

      Seek to a particular row number.
      Throws:
        `IOException`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.