public interface DataReader extends AutoCloseable, Cloneable
Modifier and Type | Method and Description |
---|---|
DataReader |
clone()
Clone the entire state of the DataReader with the assumption that the
clone will be closed at a different time.
|
void |
close() |
CompressionCodec |
getCompressionCodec()
Returns the compression codec used by this datareader.
|
boolean |
isTrackingDiskRanges()
Whether the user should release buffers created by readFileData.
|
void |
open()
Opens the DataReader, making it ready to use.
|
DiskRangeList |
readFileData(DiskRangeList range,
long baseOffset,
boolean doForceDirect)
Reads the data.
|
OrcIndex |
readRowIndex(StripeInformation stripe,
TypeDescription fileSchema,
OrcProto.StripeFooter footer,
boolean ignoreNonUtf8BloomFilter,
boolean[] included,
OrcProto.RowIndex[] indexes,
boolean[] sargColumns,
OrcFile.WriterVersion version,
OrcProto.Stream.Kind[] bloomFilterKinds,
OrcProto.BloomFilterIndex[] bloomFilterIndices) |
OrcProto.StripeFooter |
readStripeFooter(StripeInformation stripe) |
void |
releaseBuffer(ByteBuffer toRelease)
Releases buffers created by readFileData.
|
void open() throws IOException
IOException
OrcIndex readRowIndex(StripeInformation stripe, TypeDescription fileSchema, OrcProto.StripeFooter footer, boolean ignoreNonUtf8BloomFilter, boolean[] included, OrcProto.RowIndex[] indexes, boolean[] sargColumns, OrcFile.WriterVersion version, OrcProto.Stream.Kind[] bloomFilterKinds, OrcProto.BloomFilterIndex[] bloomFilterIndices) throws IOException
IOException
OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException
IOException
DiskRangeList readFileData(DiskRangeList range, long baseOffset, boolean doForceDirect) throws IOException
range
- List if disk ranges to read. Ranges with data will be ignored.baseOffset
- Base offset from the start of the file of the ranges in disk range list.doForceDirect
- Whether the data should be read into direct buffers.IOException
boolean isTrackingDiskRanges()
void releaseBuffer(ByteBuffer toRelease)
toRelease
- The buffer to release.DataReader clone()
void close() throws IOException
close
in interface AutoCloseable
IOException
CompressionCodec getCompressionCodec()
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.