public class CodecFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPRESSION_CODECS |
static String |
COMPRESSION_KEY_HEADER |
static String |
COMPRESSION_MAGIC_DATA |
static String |
COMPRESSION_OUTPUT_CODEC |
static String |
UTF_8_ENCODING |
Constructor and Description |
---|
CodecFactory() |
Modifier and Type | Method and Description |
---|---|
static CompressionCodec |
getCompressionCodec()
Get output compression codec
|
static CompressionCodec |
getDeCompressionCodec(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 String COMPRESSION_CODECS
public static final String COMPRESSION_OUTPUT_CODEC
public static final String COMPRESSION_MAGIC_DATA
public static final String COMPRESSION_KEY_HEADER
public static final String UTF_8_ENCODING
public CodecFactory()
public static void initialize(org.apache.hadoop.conf.Configuration conf) throws Exception
conf
- the configurationException
- if the codec couldn't be initializedpublic static boolean isCompressionEnabled()
public static CompressionCodec getDeCompressionCodec(DataInputStream dais) throws IOException
dais
- the input streamIOException
- in case of IO errorpublic static CompressionCodec getCompressionCodec()
public static byte[] getHeaderBytes()
Copyright © 2018 Apache Software Foundation. All rights reserved.