Package 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`
- `org.apache.hadoop.io.compress.ZStandardCodec` will map to `zstandard`

## Constructor Summary

Constructors
Constructor
Description
`HadoopCodecFactory()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### HadoopCodecFactory

public HadoopCodecFactory()

## Method Details

### 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`
- `org.apache.hadoop.io.compress.ZStandardCodec` will map to `zstandard`

### getAvroCodecName

public static String getAvroCodecName(String hadoopCodecClass)