Interface RecordReader

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractPojoRecordReader, AbstractRecordReader, CommonParquetRecordReader, DrillParquetReader, DruidRecordReader, DynamicPojoRecordReader, FindLimit0Visitor.RelDataTypeReader, HBaseRecordReader, HiveDefaultRecordReader, HiveTextRecordReader, JSONRecordReader, KuduRecordReader, MockRecordReader, MongoRecordReader, OpenTSDBRecordReader, ParquetRecordReader, PojoRecordReader

public interface RecordReader extends AutoCloseable
For new implementations please use new ManagedReader
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    Check if the reader may have potentially more data to be read in subsequent iterations.
    int
    Increments this record reader forward, writing via the provided output mutator into the output batch.
    void
    Configure the RecordReader with the provided schema and the record batch that should be written to.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Field Details

    • ALLOCATOR_INITIAL_RESERVATION

      static final long ALLOCATOR_INITIAL_RESERVATION
      See Also:
    • ALLOCATOR_MAX_RESERVATION

      static final long ALLOCATOR_MAX_RESERVATION
      See Also:
  • Method Details

    • setup

      void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException
      Configure the RecordReader with the provided schema and the record batch that should be written to.
      Parameters:
      context - operator context for the reader
      output - The place where output for a particular scan should be written. The record reader is responsible for mutating the set of schema values for that particular record.
      Throws:
      ExecutionSetupException
    • allocate

      void allocate(Map<String,ValueVector> vectorMap) throws OutOfMemoryException
      Throws:
      OutOfMemoryException
    • hasNext

      boolean hasNext()
      Check if the reader may have potentially more data to be read in subsequent iterations. Certain types of readers such as repeatable readers can be invoked multiple times, so this method will allow ScanBatch to check with the reader before closing it.
      Returns:
      return true if there could potentially be more reads, false otherwise
    • next

      int next()
      Increments this record reader forward, writing via the provided output mutator into the output batch.
      Returns:
      The number of additional records added to the output.