org.apache.avro.hadoop.file

## Class HadoopCodecFactory

- java.lang.Object
- - org.apache.avro.hadoop.file.HadoopCodecFactory

    public class HadoopCodecFactory
    extends Object

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 to `deflate`
- `org.apache.hadoop.io.compress.SnappyCodec` will map to `snappy`
- `org.apache.hadoop.io.compress.BZip2Codec` will map to `bzip2`
- `org.apache.hadoop.io.compress.GZipCodec` will map to `deflate`

### Constructor Summary

Constructors
Constructor and Description
`HadoopCodecFactory()`

### Method Summary

All Methods Static Methods Concrete Methods
`static org.apache.avro.file.CodecFactory` `fromHadoopString(String hadoopCodecClass)` Maps a hadoop codec name into a CodecFactory.
`static String` `getAvroCodecName(String hadoopCodecClass)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HadoopCodecFactory

    public HadoopCodecFactory()

### Method Detail

#### fromHadoopString

    public static org.apache.avro.file.CodecFactory fromHadoopString(String hadoopCodecClass)

Maps a hadoop codec name into a CodecFactory. Currently there are four hadoop codecs registered:

- `org.apache.hadoop.io.compress.DeflateCodec` will map to `deflate`
- `org.apache.hadoop.io.compress.SnappyCodec` will map to `snappy`
- `org.apache.hadoop.io.compress.BZip2Codec` will map to `bzip2`
- `org.apache.hadoop.io.compress.GZipCodec` will map to `deflate`

#### getAvroCodecName

    public static String getAvroCodecName(String hadoopCodecClass)