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 TypeMethodDescriptionbooleanendVariableLengthBlock(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, waitMethods 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:HadoopShimsGet a direct decompressor codec, if it is available- Specified by:
getDirectDecompressorin 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:HadoopShimsProvides an HDFS ZeroCopyReader shim.- Specified by:
getZeroCopyReaderin 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:HadoopShimsEnd 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:
endVariableLengthBlockin interfaceHadoopShims- Returns:
- was a variable length block created?
- Throws:
IOException
-
getHadoopKeyProvider
Description copied from interface:HadoopShimsCreate a Hadoop KeyProvider to get encryption keys.- Specified by:
getHadoopKeyProviderin interfaceHadoopShims- Parameters:
conf- the configurationrandom- a secure random number generator- Returns:
- a key provider or null if none was provided
- Throws:
IOException
-