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() |
InStream.StreamOptions |
getCompressionOptions()
Returns the compression options 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.
|
BufferChunkList |
readFileData(BufferChunkList range,
boolean doForceDirect)
Reads the data from the file.
|
OrcProto.StripeFooter |
readStripeFooter(StripeInformation stripe) |
void |
releaseBuffer(ByteBuffer toRelease)
Releases buffers created by readFileData.
|
void open() throws IOException
IOException
OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException
IOException
BufferChunkList readFileData(BufferChunkList range, boolean doForceDirect) throws IOException
range
- List of disk ranges to read. Ranges with data will be ignored.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
InStream.StreamOptions getCompressionOptions()
Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.