protected abstract static class AbstractOrcFileInputFormat.OrcReaderBatch<T,BatchT> extends Object
OrcReaderBatch
class holds the data structures containing the batch data (column
vectors, row arrays, ...) and performs the batch conversion from the ORC representation to
the result format.
This base class only holds the ORC Column Vectors, subclasses hold additionally the result
structures and implement the conversion in convertAndGetIterator(OrcVectorizedBatchWrapper, long)
.
Modifier | Constructor and Description |
---|---|
protected |
OrcReaderBatch(OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch,
Pool.Recycler<AbstractOrcFileInputFormat.OrcReaderBatch<T,BatchT>> recycler) |
Modifier and Type | Method and Description |
---|---|
abstract BulkFormat.RecordIterator<T> |
convertAndGetIterator(OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch,
long startingOffset)
Converts the ORC VectorizedRowBatch into the result structure and returns an iterator
over the entries.
|
OrcVectorizedBatchWrapper<BatchT> |
orcVectorizedRowBatch()
Gets the ORC VectorizedRowBatch structure from this batch.
|
void |
recycle()
Puts this batch back into the pool.
|
protected OrcReaderBatch(OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch, Pool.Recycler<AbstractOrcFileInputFormat.OrcReaderBatch<T,BatchT>> recycler)
public void recycle()
RecordIterator#releaseBatch()
method.public OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch()
public abstract BulkFormat.RecordIterator<T> convertAndGetIterator(OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch, long startingOffset) throws IOException
This method may, for example, return a single element iterator that returns the entire batch as one, or (as another example) return an iterator over the rows projected from this column batch.
The position information in the result needs to be constructed as follows: The value
of startingOffset
is the offset value (RecordAndPosition.getOffset()
) for
all rows in the batch. Each row then increments the records-to-skip value (RecordAndPosition.getRecordSkipCount()
).
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.