Bzip2Factory (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.compress.bzip2, class: Bzip2Factory

Package org.apache.hadoop.io.compress.bzip2

# 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 Summary

  Constructors
  Constructor
  Description
  `Bzip2Factory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `getBlockSize(Configuration conf)`
  `static Compressor`
  `getBzip2Compressor(Configuration conf)`
  Return the appropriate implementation of the bzip2 compressor.
  `static Class<? extends Compressor>`
  `getBzip2CompressorType(Configuration conf)`
  Return the appropriate type of the bzip2 compressor.
  `static Decompressor`
  `getBzip2Decompressor(Configuration conf)`
  Return the appropriate implementation of the bzip2 decompressor.
  `static Class<? extends Decompressor>`
  `getBzip2DecompressorType(Configuration conf)`
  Return the appropriate type of the bzip2 decompressor.
  `static String`
  `getLibraryName(Configuration conf)`
  `static int`
  `getWorkFactor(Configuration conf)`
  `static boolean`
  `isNativeBzip2Loaded(Configuration conf)`
  Check if native-bzip2 code is loaded & initialized correctly and can be loaded for this job.
  `static void`
  `setBlockSize(Configuration conf, int blockSize)`
  `static void`
  `setWorkFactor(Configuration conf, int workFactor)`

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

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

- ## 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)