Package org.apache.orc.impl
Interface HadoopShims.ZeroCopyReaderShim
- All Superinterfaces:
AutoCloseable,Closeable
- Enclosing interface:
- HadoopShims
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the underlying stream.readBuffer(int maxLength, boolean verifyChecksums) Get a ByteBuffer from the FSDataInputStream - this can be either a HeapByteBuffer or an MappedByteBuffer.voidRelease all ByteBuffers obtained from readBuffer on this ZeroCopyReaderShim.voidreleaseBuffer(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
releaseAllBuffers()instead.