org.apache.hadoop.hive.ql.io
Class CodecPool

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.CodecPool

public final class CodecPool
extends Object

A global compressor/decompressor pool used to save and reuse (possibly native) compression/decompression codecs.


Method Summary
static org.apache.hadoop.io.compress.Compressor getCompressor(org.apache.hadoop.io.compress.CompressionCodec codec)
          Get a Compressor for the given CompressionCodec from the pool or a new one.
static org.apache.hadoop.io.compress.Decompressor getDecompressor(org.apache.hadoop.io.compress.CompressionCodec codec)
          Get a Decompressor for the given CompressionCodec from the pool or a new one.
static void returnCompressor(org.apache.hadoop.io.compress.Compressor compressor)
          Return the Compressor to the pool.
static void returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor)
          Return the Decompressor to the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCompressor

public static org.apache.hadoop.io.compress.Compressor getCompressor(org.apache.hadoop.io.compress.CompressionCodec codec)
Get a Compressor for the given CompressionCodec from the pool or a new one.

Parameters:
codec - the CompressionCodec for which to get the Compressor
Returns:
Compressor for the given CompressionCodec from the pool or a new one

getDecompressor

public static org.apache.hadoop.io.compress.Decompressor getDecompressor(org.apache.hadoop.io.compress.CompressionCodec codec)
Get a Decompressor for the given CompressionCodec from the pool or a new one.

Parameters:
codec - the CompressionCodec for which to get the Decompressor
Returns:
Decompressor for the given CompressionCodec the pool or a new one

returnCompressor

public static void returnCompressor(org.apache.hadoop.io.compress.Compressor compressor)
Return the Compressor to the pool.

Parameters:
compressor - the Compressor to be returned to the pool

returnDecompressor

public static void returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor)
Return the Decompressor to the pool.

Parameters:
decompressor - the Decompressor to be returned to the pool


Copyright © 2013 The Apache Software Foundation