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

java.lang.Object
  extended by 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 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.
 
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.


Copyright © 2008 The Apache Software Foundation