HadoopShimsPre2_7 (ORC Shims 1.6.6 API)
Date: 2021-01-13

org.apache.orc.impl

## Class HadoopShimsPre2_7

- java.lang.Object
- - org.apache.orc.impl.HadoopShimsPre2_7

- All Implemented Interfaces:
    HadoopShims

      public class HadoopShimsPre2_7
      extends Object
      implements HadoopShims

  Shims for versions of Hadoop less than 2.7. Adds support for:
  - Crypto

- - ### 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
    Constructor and Description
    `HadoopShimsPre2_7()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `endVariableLengthBlock(OutputStream output)` End the OutputStream's current block at the current location.
    `HadoopShims.DirectDecompressor` | `getDirectDecompressor(HadoopShims.DirectCompressionType codec)` Get a direct decompressor codec, if it is available
    `KeyProvider` | `getHadoopKeyProvider(Configuration conf, Random random)` Create a Hadoop KeyProvider to get encryption keys.
    `HadoopShims.ZeroCopyReaderShim` | `getZeroCopyReader(FSDataInputStream in, HadoopShims.ByteBufferPoolShim pool)` Provides an HDFS ZeroCopyReader shim.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HadoopShimsPre2_7

          public HadoopShimsPre2_7()

  - ### Method Detail

    - #### 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 interface `HadoopShims`
      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 interface `HadoopShims`
      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

          public boolean endVariableLengthBlock(OutputStream output)

      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 interface `HadoopShims`
      Returns:
        was a variable length block created?

    - #### getHadoopKeyProvider

          public KeyProvider getHadoopKeyProvider(Configuration conf,
                                                  Random random)
                                           throws IOException

      Description copied from interface: `HadoopShims`
      Create a Hadoop KeyProvider to get encryption keys.
      Specified by:
        `getHadoopKeyProvider` in interface `HadoopShims`
      Parameters:
        `conf` - the configuration
        `random` - a secure random number generator
      Returns:
        a key provider or null if none was provided
      Throws:
        `IOException`

Copyright © 2013–2021 The Apache Software Foundation. All rights reserved.