Class Bzip2Factory

java.lang.Object
org.apache.hadoop.io.compress.bzip2.Bzip2Factory

public class Bzip2Factory extends Object
A collection of factories to create the right bzip2 compressor/decompressor instances.
  • Constructor Details

    • Bzip2Factory

      public Bzip2Factory()
  • Method Details

    • isNativeBzip2Loaded

      public static boolean isNativeBzip2Loaded(Configuration conf)
      Check if native-bzip2 code is loaded & initialized correctly and can be loaded for this job.
      Parameters:
      conf - configuration
      Returns:
      true if native-bzip2 is loaded & initialized and can be loaded for this job, else false
    • getLibraryName

      public static String getLibraryName(Configuration conf)
    • getBzip2CompressorType

      public static Class<? extends Compressor> getBzip2CompressorType(Configuration conf)
      Return the appropriate type of the bzip2 compressor.
      Parameters:
      conf - configuration
      Returns:
      the appropriate type of the bzip2 compressor.
    • getBzip2Compressor

      public static Compressor getBzip2Compressor(Configuration conf)
      Return the appropriate implementation of the bzip2 compressor.
      Parameters:
      conf - configuration
      Returns:
      the appropriate implementation of the bzip2 compressor.
    • getBzip2DecompressorType

      public static Class<? extends Decompressor> getBzip2DecompressorType(Configuration conf)
      Return the appropriate type of the bzip2 decompressor.
      Parameters:
      conf - configuration
      Returns:
      the appropriate type of the bzip2 decompressor.
    • getBzip2Decompressor

      public static Decompressor getBzip2Decompressor(Configuration conf)
      Return the appropriate implementation of the bzip2 decompressor.
      Parameters:
      conf - configuration
      Returns:
      the appropriate implementation of the bzip2 decompressor.
    • setBlockSize

      public static void setBlockSize(Configuration conf, int blockSize)
    • getBlockSize

      public static int getBlockSize(Configuration conf)
    • setWorkFactor

      public static void setWorkFactor(Configuration conf, int workFactor)
    • getWorkFactor

      public static int getWorkFactor(Configuration conf)