Package org.apache.orc.impl
Class HadoopShimsCurrent
java.lang.Object
org.apache.orc.impl.HadoopShimsCurrent
- All Implemented Interfaces:
HadoopShims
Shims for recent versions of Hadoop
Adds support for:
- Variable length HDFS blocks
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.impl.HadoopShims
HadoopShims.ByteBufferPoolShim, HadoopShims.DirectCompressionType, HadoopShims.DirectDecompressor, HadoopShims.KeyMetadata, HadoopShims.KeyProviderKind, HadoopShims.ZeroCopyReaderShim
-
Constructor Summary
Constructors -
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.orc.impl.HadoopShims
supportVectoredIO
-
Constructor Details
-
HadoopShimsCurrent
public HadoopShimsCurrent()
-
-
Method Details
-
getDirectDecompressor
public HadoopShims.DirectDecompressor getDirectDecompressor(HadoopShims.DirectCompressionType codec) Description copied from interface:HadoopShims
Get a direct decompressor codec, if it is available- Specified by:
getDirectDecompressor
in interfaceHadoopShims
- Parameters:
codec
- the kind of decompressor that we need- Returns:
- a direct decompressor or null, if it isn't available
-
getZeroCopyReader
public HadoopShims.ZeroCopyReaderShim getZeroCopyReader(FSDataInputStream in, HadoopShims.ByteBufferPoolShim pool) throws IOException Description copied from interface:HadoopShims
Provides an HDFS ZeroCopyReader shim.- Specified by:
getZeroCopyReader
in interfaceHadoopShims
- 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
Description copied from interface:HadoopShims
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.- Specified by:
endVariableLengthBlock
in interfaceHadoopShims
- Returns:
- was a variable length block created?
- Throws:
IOException
-
getHadoopKeyProvider
Description copied from interface:HadoopShims
Create a Hadoop KeyProvider to get encryption keys.- Specified by:
getHadoopKeyProvider
in interfaceHadoopShims
- Parameters:
conf
- the configurationrandom
- a secure random number generator- Returns:
- a key provider or null if none was provided
- Throws:
IOException
-