public class CodecFactory extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPRESSION_CODECS |
static java.lang.String |
COMPRESSION_KEY_HEADER |
static java.lang.String |
COMPRESSION_MAGIC_DATA |
static java.lang.String |
COMPRESSION_OUTPUT_CODEC |
static java.lang.String |
UTF_8_ENCODING |
| Constructor and Description |
|---|
CodecFactory() |
| Modifier and Type | Method and Description |
|---|---|
static CompressionCodec |
getCompressionCodec()
Get output compression codec
|
static CompressionCodec |
getDeCompressionCodec(java.io.DataInputStream dais)
Get decompression codec after reading from stream
|
static byte[] |
getHeaderBytes()
Get header bytes
|
static void |
initialize(org.apache.hadoop.conf.Configuration conf)
Initialize the codec factory to maintain list of codecs
|
static boolean |
isCompressionEnabled()
Check whether compression is enabled or not
|
public static final java.lang.String COMPRESSION_CODECS
public static final java.lang.String COMPRESSION_OUTPUT_CODEC
public static final java.lang.String COMPRESSION_MAGIC_DATA
public static final java.lang.String COMPRESSION_KEY_HEADER
public static final java.lang.String UTF_8_ENCODING
public CodecFactory()
public static void initialize(org.apache.hadoop.conf.Configuration conf) throws java.lang.Exception
conf - java.lang.Exceptionpublic static boolean isCompressionEnabled()
public static CompressionCodec getDeCompressionCodec(java.io.DataInputStream dais) throws java.io.IOException
dais - the input streamjava.io.IOExceptionpublic static CompressionCodec getCompressionCodec()
public static byte[] getHeaderBytes()
Copyright © 2019 Apache Software Foundation. All Rights Reserved.