Package org.apache.avro.hadoop.file
Class HadoopCodecFactory
java.lang.Object
org.apache.avro.hadoop.file.HadoopCodecFactory
Encapsulates the ability to specify and configure an avro compression codec
from a given hadoop codec defined with the configuration parameter:
mapred.output.compression.codec
Currently there are three codecs registered by default:
org.apache.hadoop.io.compress.DeflateCodec
will map todeflate
org.apache.hadoop.io.compress.SnappyCodec
will map tosnappy
org.apache.hadoop.io.compress.BZip2Codec
will map tobzip2
org.apache.hadoop.io.compress.GZipCodec
will map todeflate
org.apache.hadoop.io.compress.ZStandardCodec
will map tozstandard
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CodecFactory
fromHadoopString
(String hadoopCodecClass) Maps a hadoop codec name into a CodecFactory.static String
getAvroCodecName
(String hadoopCodecClass)
-
Constructor Details
-
HadoopCodecFactory
public HadoopCodecFactory()
-
-
Method Details
-
fromHadoopString
Maps a hadoop codec name into a CodecFactory. Currently there are four hadoop codecs registered:org.apache.hadoop.io.compress.DeflateCodec
will map todeflate
org.apache.hadoop.io.compress.SnappyCodec
will map tosnappy
org.apache.hadoop.io.compress.BZip2Codec
will map tobzip2
org.apache.hadoop.io.compress.GZipCodec
will map todeflate
org.apache.hadoop.io.compress.ZStandardCodec
will map tozstandard
-
getAvroCodecName
-