@InterfaceAudience.Private public class ZstdCodec extends Object implements org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.compress.CompressionCodec
Unlike the other codecs this one should be considered as under development and unstable (as in changing), reflecting the status of aircompressor's zstandard implementation.
NOTE: This codec is NOT data format compatible with the Hadoop native zstandard codec. There are issues with both framing and limitations of the aircompressor zstandard compressor. This codec can be used as an alternative to the native codec, if the native codec cannot be made available and/or an eventual migration will never be necessary (i.e. this codec's performance meets anticipated requirements). Once you begin using this alternative you will be locked into it.
Modifier and Type | Class and Description |
---|---|
class |
ZstdCodec.HadoopZstdCompressor |
class |
ZstdCodec.HadoopZstdDecompressor |
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
static int |
ZSTD_BUFFER_SIZE_DEFAULT |
static String |
ZSTD_BUFFER_SIZE_KEY |
Constructor and Description |
---|
ZstdCodec() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.io.compress.Compressor |
createCompressor() |
org.apache.hadoop.io.compress.Decompressor |
createDecompressor() |
org.apache.hadoop.io.compress.CompressionInputStream |
createInputStream(InputStream in) |
org.apache.hadoop.io.compress.CompressionInputStream |
createInputStream(InputStream in,
org.apache.hadoop.io.compress.Decompressor d) |
org.apache.hadoop.io.compress.CompressionOutputStream |
createOutputStream(OutputStream out) |
org.apache.hadoop.io.compress.CompressionOutputStream |
createOutputStream(OutputStream out,
org.apache.hadoop.io.compress.Compressor c) |
(package private) static int |
getBufferSize(org.apache.hadoop.conf.Configuration conf) |
Class<? extends org.apache.hadoop.io.compress.Compressor> |
getCompressorType() |
org.apache.hadoop.conf.Configuration |
getConf() |
Class<? extends org.apache.hadoop.io.compress.Decompressor> |
getDecompressorType() |
String |
getDefaultExtension() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
public static final String ZSTD_BUFFER_SIZE_KEY
public static final int ZSTD_BUFFER_SIZE_DEFAULT
private org.apache.hadoop.conf.Configuration conf
public ZstdCodec()
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.io.compress.Compressor createCompressor()
createCompressor
in interface org.apache.hadoop.io.compress.CompressionCodec
public org.apache.hadoop.io.compress.Decompressor createDecompressor()
createDecompressor
in interface org.apache.hadoop.io.compress.CompressionCodec
public org.apache.hadoop.io.compress.CompressionInputStream createInputStream(InputStream in) throws IOException
createInputStream
in interface org.apache.hadoop.io.compress.CompressionCodec
IOException
public org.apache.hadoop.io.compress.CompressionInputStream createInputStream(InputStream in, org.apache.hadoop.io.compress.Decompressor d) throws IOException
createInputStream
in interface org.apache.hadoop.io.compress.CompressionCodec
IOException
public org.apache.hadoop.io.compress.CompressionOutputStream createOutputStream(OutputStream out) throws IOException
createOutputStream
in interface org.apache.hadoop.io.compress.CompressionCodec
IOException
public org.apache.hadoop.io.compress.CompressionOutputStream createOutputStream(OutputStream out, org.apache.hadoop.io.compress.Compressor c) throws IOException
createOutputStream
in interface org.apache.hadoop.io.compress.CompressionCodec
IOException
public Class<? extends org.apache.hadoop.io.compress.Compressor> getCompressorType()
getCompressorType
in interface org.apache.hadoop.io.compress.CompressionCodec
public Class<? extends org.apache.hadoop.io.compress.Decompressor> getDecompressorType()
getDecompressorType
in interface org.apache.hadoop.io.compress.CompressionCodec
public String getDefaultExtension()
getDefaultExtension
in interface org.apache.hadoop.io.compress.CompressionCodec
static int getBufferSize(org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.