Package org.apache.orc.impl
Interface HadoopShims
- All Known Implementing Classes:
HadoopShimsCurrent
public interface HadoopShims
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
a hadoop.io ByteBufferPool shim.static enum
static interface
static class
Information about a crypto key including the key name, version, and the algorithm.static enum
The known KeyProviders for column encryption.static interface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
endVariableLengthBlock
(OutputStream output) End the OutputStream's current block at the current location.Get a direct decompressor codec, if it is availablegetHadoopKeyProvider
(Configuration conf, Random random) Create a Hadoop KeyProvider to get encryption keys.Provides an HDFS ZeroCopyReader shim.default boolean
supportVectoredIO
(String version)
-
Method Details
-
getDirectDecompressor
Get a direct decompressor codec, if it is available- Parameters:
codec
- the kind of decompressor that we need- Returns:
- a direct decompressor or null, if it isn't available
-
getZeroCopyReader
HadoopShims.ZeroCopyReaderShim getZeroCopyReader(FSDataInputStream in, HadoopShims.ByteBufferPoolShim pool) throws IOException Provides an HDFS ZeroCopyReader shim.- Parameters:
in
- FSDataInputStream to read from (where the cached/mmap buffers are tied to)pool
- ByteBufferPoolShim to allocate fallback buffers with- Returns:
- returns null if not supported
- Throws:
IOException
-
endVariableLengthBlock
End the OutputStream's current block at the current location. This is only available on HDFS on Hadoop ≥ 2.7, but will return false otherwise.- Returns:
- was a variable length block created?
- Throws:
IOException
-
supportVectoredIO
-
getHadoopKeyProvider
Create a Hadoop KeyProvider to get encryption keys.- Parameters:
conf
- the configurationrandom
- a secure random number generator- Returns:
- a key provider or null if none was provided
- Throws:
IOException
-