T - The type of the records returned by the reader.protected static final class AbstractOrcFileInputFormat.OrcVectorizedReader<T,BatchT> extends Object implements org.apache.flink.connector.file.src.reader.BulkFormat.Reader<T>
BatchT at a time and converts it to
one or more records to be returned. An ORC Row-wise reader would convert the batch into a set
of rows, while a reader for a vectorized query processor might return the whole batch as one
record.
The conversion of the VectorizedRowBatch happens in the specific AbstractOrcFileInputFormat.OrcReaderBatch implementation.
The reader tracks its current position using ORC's row numbers. Each record in a batch is addressed by the starting row number of the batch, plus the number of records to be skipped before.
| 限定符 | 构造器和说明 |
|---|---|
protected |
OrcVectorizedReader(OrcShim<BatchT> shim,
org.apache.orc.RecordReader orcReader,
org.apache.flink.connector.file.src.util.Pool<AbstractOrcFileInputFormat.OrcReaderBatch<T,BatchT>> pool) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
org.apache.flink.connector.file.src.reader.BulkFormat.RecordIterator<T> |
readBatch() |
void |
seek(org.apache.flink.connector.file.src.util.CheckpointedPosition position)
The argument of
RecordReader.seekToRow(long) must come from RecordReader.getRowNumber(). |
protected OrcVectorizedReader(OrcShim<BatchT> shim, org.apache.orc.RecordReader orcReader, org.apache.flink.connector.file.src.util.Pool<AbstractOrcFileInputFormat.OrcReaderBatch<T,BatchT>> pool)
@Nullable public org.apache.flink.connector.file.src.reader.BulkFormat.RecordIterator<T> readBatch() throws IOException
readBatch 在接口中 org.apache.flink.connector.file.src.reader.BulkFormat.Reader<T>IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 org.apache.flink.connector.file.src.reader.BulkFormat.Reader<T>IOExceptionpublic void seek(org.apache.flink.connector.file.src.util.CheckpointedPosition position)
throws IOException
RecordReader.seekToRow(long) must come from RecordReader.getRowNumber(). The internal implementation of ORC is very confusing. It
has special behavior when dealing with Predicate.IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.