Package org.apache.drill.exec.store
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
For new implementations please use new
ManagedReader
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final long
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(Map<String, ValueVector> vectorMap) boolean
hasNext()
Check if the reader may have potentially more data to be read in subsequent iterations.int
next()
Increments this record reader forward, writing via the provided output mutator into the output batch.void
setup
(OperatorContext context, OutputMutator output) 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
Configure the RecordReader with the provided schema and the record batch that should be written to.- Parameters:
context
- operator context for the readeroutput
- 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
- 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.
-