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

org.apache.orc.impl

## Interface HadoopShims

- All Known Implementing Classes:
    HadoopShimsCurrent, HadoopShimsPre2_3, HadoopShimsPre2_6, HadoopShimsPre2_7

      public interface HadoopShims

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `HadoopShims.ByteBufferPoolShim` a hadoop.io ByteBufferPool shim.
    `static class` | `HadoopShims.DirectCompressionType`
    `static interface` | `HadoopShims.DirectDecompressor`
    `static class` | `HadoopShims.KeyMetadata` Information about a crypto key including the key name, version, and the algorithm.
    `static class` | `HadoopShims.KeyProviderKind` The known KeyProviders for column encryption.
    `static interface` | `HadoopShims.ZeroCopyReaderShim`

  - ### Method Summary

    All Methods Instance Methods Abstract 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.

- - ### Method Detail

    - #### getDirectDecompressor

          HadoopShims.DirectDecompressor getDirectDecompressor(HadoopShims.DirectCompressionType codec)

      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

          boolean endVariableLengthBlock(OutputStream output)
                                  throws IOException

      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`

    - #### getHadoopKeyProvider

          KeyProvider getHadoopKeyProvider(Configuration conf,
                                           Random random)
                                    throws IOException

      Create a Hadoop KeyProvider to get encryption keys.
      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.