@Public
@Evolving
public class CodecPool
extends java.lang.Object
| Constructor | Description |
|---|---|
CodecPool() |
| Modifier and Type | Method | Description |
|---|---|---|
static Compressor |
getCompressor(CompressionCodec codec) |
|
static Compressor |
getCompressor(CompressionCodec codec,
Configuration conf) |
Get a
Compressor for the given CompressionCodec from the
pool or a new one. |
static Decompressor |
getDecompressor(CompressionCodec codec) |
Get a
Decompressor for the given CompressionCodec from the
pool or a new one. |
static int |
getLeasedCompressorsCount(CompressionCodec codec) |
Return the number of leased
Compressors for this
CompressionCodec. |
static int |
getLeasedDecompressorsCount(CompressionCodec codec) |
Return the number of leased
Decompressors for this
CompressionCodec. |
static void |
returnCompressor(Compressor compressor) |
Return the
Compressor to the pool. |
static void |
returnDecompressor(Decompressor decompressor) |
Return the
Decompressor to the pool. |
public static Compressor getCompressor(CompressionCodec codec, Configuration conf)
Compressor for the given CompressionCodec from the
pool or a new one.codec - the CompressionCodec for which to get the
Compressorconf - the Configuration object which contains confs for creating or reinit the compressorCompressor for the given
CompressionCodec from the pool or a new onepublic static Compressor getCompressor(CompressionCodec codec)
public static Decompressor getDecompressor(CompressionCodec codec)
Decompressor for the given CompressionCodec from the
pool or a new one.codec - the CompressionCodec for which to get the
DecompressorDecompressor for the given
CompressionCodec the pool or a new onepublic static void returnCompressor(Compressor compressor)
Compressor to the pool.compressor - the Compressor to be returned to the poolpublic static void returnDecompressor(Decompressor decompressor)
Decompressor to the pool.decompressor - the Decompressor to be returned to the
poolpublic static int getLeasedCompressorsCount(CompressionCodec codec)
Compressors for this
CompressionCodec.codec - codec.public static int getLeasedDecompressorsCount(CompressionCodec codec)
Decompressors for this
CompressionCodec.codec - codec.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.