java.lang.Object
org.apache.arrow.adapter.orc.OrcReader
All Implemented Interfaces:
AutoCloseable

public class OrcReader extends Object implements AutoCloseable
Orc Reader that allow accessing orc stripes in Orc file. This orc reader basically acts like an ArrowReader iterator that iterate over orc stripes. Each stripe will be accessed via an ArrowReader.
  • Constructor Details

  • Method Details

    • seek

      public boolean seek(int rowNumber) throws IllegalArgumentException
      Seek to designated row. Invoke NextStripeReader() after seek will return stripe reader starting from designated row.
      Parameters:
      rowNumber - the rows number to seek
      Returns:
      true if seek operation is succeeded
      Throws:
      IllegalArgumentException
    • nextStripeReader

      public ArrowReader nextStripeReader(long batchSize) throws IllegalArgumentException
      Get a stripe level ArrowReader with specified batchSize in each record batch.
      Parameters:
      batchSize - the number of rows loaded on each iteration
      Returns:
      ArrowReader that iterate over current stripes
      Throws:
      IllegalArgumentException
    • getNumberOfStripes

      public int getNumberOfStripes() throws IllegalArgumentException
      The number of stripes in the file.
      Returns:
      number of stripes
      Throws:
      IllegalArgumentException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable