ZlibFactory (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.io.compress.zlib
Class ZlibFactory

    java.lang.Object
      org.apache.hadoop.io.compress.zlib.ZlibFactory

    public class ZlibFactory

extends Object

A collection of factories to create the right zlib/gzip compressor/decompressor instances.

Constructor Summary
`ZlibFactory()`

Method Summary
`static ZlibCompressor.CompressionLevel` | `getCompressionLevel(Configuration conf)`
`static ZlibCompressor.CompressionStrategy` | `getCompressionStrategy(Configuration conf)`
`static Compressor` | `getZlibCompressor(Configuration conf)` Return the appropriate implementation of the zlib compressor.
`static Class<? extends Compressor>` | `getZlibCompressorType(Configuration conf)` Return the appropriate type of the zlib compressor.
`static Decompressor` | `getZlibDecompressor(Configuration conf)` Return the appropriate implementation of the zlib decompressor.
`static Class<? extends Decompressor>` | `getZlibDecompressorType(Configuration conf)` Return the appropriate type of the zlib decompressor.
`static boolean` | `isNativeZlibLoaded(Configuration conf)` Check if native-zlib code is loaded & initialized correctly and can be loaded for this job.
`static void` | `setCompressionLevel(Configuration conf, ZlibCompressor.CompressionLevel level)`
`static void` | `setCompressionStrategy(Configuration conf, ZlibCompressor.CompressionStrategy strategy)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ZlibFactory

    public ZlibFactory()

Method Detail

### isNativeZlibLoaded

    public static boolean isNativeZlibLoaded(Configuration conf)

  Check if native-zlib code is loaded & initialized correctly and can be loaded for this job.

  Parameters:
    `conf` - configuration
  Returns:
    `true` if native-zlib is loaded & initialized and can be loaded for this job, else `false`

### getZlibCompressorType

    public static Class<? extends Compressor> getZlibCompressorType(Configuration conf)

  Return the appropriate type of the zlib compressor.

  Parameters:
    `conf` - configuration
  Returns:
    the appropriate type of the zlib compressor.

### getZlibCompressor

    public static Compressor getZlibCompressor(Configuration conf)

  Return the appropriate implementation of the zlib compressor.

  Parameters:
    `conf` - configuration
  Returns:
    the appropriate implementation of the zlib compressor.

### getZlibDecompressorType

    public static Class<? extends Decompressor> getZlibDecompressorType(Configuration conf)

  Return the appropriate type of the zlib decompressor.

  Parameters:
    `conf` - configuration
  Returns:
    the appropriate type of the zlib decompressor.

### getZlibDecompressor

    public static Decompressor getZlibDecompressor(Configuration conf)

  Return the appropriate implementation of the zlib decompressor.

  Parameters:
    `conf` - configuration
  Returns:
    the appropriate implementation of the zlib decompressor.

### setCompressionStrategy

    public static void setCompressionStrategy(Configuration conf,
                                              ZlibCompressor.CompressionStrategy strategy)

### getCompressionStrategy

    public static ZlibCompressor.CompressionStrategy getCompressionStrategy(Configuration conf)

### setCompressionLevel

    public static void setCompressionLevel(Configuration conf,
                                           ZlibCompressor.CompressionLevel level)

### getCompressionLevel

    public static ZlibCompressor.CompressionLevel getCompressionLevel(Configuration conf)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation