Package org.apache.orc.impl
Interface HadoopShims.ZeroCopyReaderShim
- All Superinterfaces:
AutoCloseable
,Closeable
- Enclosing interface:
- HadoopShims
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the underlying stream.readBuffer
(int maxLength, boolean verifyChecksums) Get a ByteBuffer from the FSDataInputStream - this can be either a HeapByteBuffer or an MappedByteBuffer.void
Release all ByteBuffers obtained from readBuffer on this ZeroCopyReaderShim.void
releaseBuffer
(ByteBuffer buffer) Deprecated.
-
Method Details
-
readBuffer
Get a ByteBuffer from the FSDataInputStream - this can be either a HeapByteBuffer or an MappedByteBuffer. Also move the in stream by that amount. The data read can be small than maxLength.- Returns:
- ByteBuffer read from the stream,
- Throws:
IOException
-
releaseBuffer
Deprecated.UsereleaseAllBuffers()
instead. This method was incorrectly used by upper level code and shouldn't be used anymore.Release a ByteBuffer obtained from a readBuffer on this ZeroCopyReaderShim. -
releaseAllBuffers
void releaseAllBuffers()Release all ByteBuffers obtained from readBuffer on this ZeroCopyReaderShim. -
close
Close the underlying stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
releaseAllBuffers()
instead.