Class HBaseRecordReader

java.lang.Object
org.apache.drill.exec.store.AbstractRecordReader
org.apache.drill.exec.store.hbase.HBaseRecordReader
All Implemented Interfaces:
AutoCloseable, DrillHBaseConstants, RecordReader

public class HBaseRecordReader extends AbstractRecordReader implements DrillHBaseConstants
  • Constructor Details

  • Method Details

    • transformColumns

      protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> columns)
      Provides the projected columns information to the Hbase Scan instance. If the projected columns list contains a column family and also a column in the column family, only the column family is passed to the Scan instance. For example, if the projection list is {cf1, cf1.col1, cf2.col1} then we only pass {cf1, cf2.col1} to the Scan instance.
      Overrides:
      transformColumns in class AbstractRecordReader
      Parameters:
      columns - collection of projected columns
      Returns:
      collection of projected column family names
    • setup

      public void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException
      Description copied from interface: RecordReader
      Configure the RecordReader with the provided schema and the record batch that should be written to.
      Specified by:
      setup in interface RecordReader
      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
    • next

      public int next()
      Description copied from interface: RecordReader
      Increments this record reader forward, writing via the provided output mutator into the output batch.
      Specified by:
      next in interface RecordReader
      Returns:
      The number of additional records added to the output.
    • close

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

      public String toString()
      Overrides:
      toString in class AbstractRecordReader