Class HadoopCompressor<T extends io.airlift.compress.Compressor>

java.lang.Object
org.apache.hadoop.hbase.io.compress.aircompressor.HadoopCompressor<T>
All Implemented Interfaces:
CanReinit, org.apache.hadoop.io.compress.Compressor
Direct Known Subclasses:
Lz4Codec.HadoopLz4Compressor, LzoCodec.HadoopLzoCompressor, SnappyCodec.HadoopSnappyCompressor, ZstdCodec.HadoopZstdCompressor

@Private public abstract class HadoopCompressor<T extends io.airlift.compress.Compressor> extends Object implements CanReinit, org.apache.hadoop.io.compress.Compressor
Hadoop compressor glue for aircompressor compressors.
  • Field Details

  • Constructor Details

  • Method Details

    • compress

      public int compress(byte[] b, int off, int len) throws IOException
      Specified by:
      compress in interface org.apache.hadoop.io.compress.Compressor
      Throws:
      IOException
    • end

      public void end()
      Specified by:
      end in interface org.apache.hadoop.io.compress.Compressor
    • finish

      public void finish()
      Specified by:
      finish in interface org.apache.hadoop.io.compress.Compressor
    • finished

      public boolean finished()
      Specified by:
      finished in interface org.apache.hadoop.io.compress.Compressor
    • getBytesRead

      public long getBytesRead()
      Specified by:
      getBytesRead in interface org.apache.hadoop.io.compress.Compressor
    • getBytesWritten

      public long getBytesWritten()
      Specified by:
      getBytesWritten in interface org.apache.hadoop.io.compress.Compressor
    • needsInput

      public boolean needsInput()
      Specified by:
      needsInput in interface org.apache.hadoop.io.compress.Compressor
    • reinit

      public void reinit(org.apache.hadoop.conf.Configuration conf)
      Specified by:
      reinit in interface CanReinit
      Specified by:
      reinit in interface org.apache.hadoop.io.compress.Compressor
    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.hadoop.io.compress.Compressor
    • setDictionary

      public void setDictionary(byte[] b, int off, int len)
      Specified by:
      setDictionary in interface org.apache.hadoop.io.compress.Compressor
    • setInput

      public void setInput(byte[] b, int off, int len)
      Specified by:
      setInput in interface org.apache.hadoop.io.compress.Compressor
    • maxCompressedLength

      int maxCompressedLength(int len)
    • getLevel

      abstract int getLevel(org.apache.hadoop.conf.Configuration conf)
    • getBufferSize

      abstract int getBufferSize(org.apache.hadoop.conf.Configuration conf)