Interface HadoopShims

All Known Implementing Classes:
HadoopShimsCurrent

public interface HadoopShims
  • 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

      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
    • supportVectoredIO

      default boolean supportVectoredIO(String version)
    • 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