@InterfaceAudience.Public public static enum Compression.Algorithm extends Enum<Compression.Algorithm>
Enum Constant and Description |
---|
BROTLI |
BZIP2 |
GZ |
LZ4 |
LZMA |
LZO |
NONE |
SNAPPY |
ZSTD |
Modifier and Type | Method and Description |
---|---|
OutputStream |
createCompressionStream(OutputStream downStream,
org.apache.hadoop.io.compress.Compressor compressor,
int downStreamBufferSize) |
InputStream |
createDecompressionStream(InputStream downStream,
org.apache.hadoop.io.compress.Decompressor decompressor,
int downStreamBufferSize) |
org.apache.hadoop.io.compress.CompressionOutputStream |
createPlainCompressionStream(OutputStream downStream,
org.apache.hadoop.io.compress.Compressor compressor)
Creates a compression stream without any additional wrapping into buffering streams.
|
org.apache.hadoop.io.compress.Compressor |
getCompressor() |
org.apache.hadoop.io.compress.Decompressor |
getDecompressor() |
String |
getName() |
abstract org.apache.hadoop.io.compress.CompressionCodec |
reload(org.apache.hadoop.conf.Configuration conf)
Reload configuration for the given algorithm.
|
void |
returnCompressor(org.apache.hadoop.io.compress.Compressor compressor) |
void |
returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor) |
static Compression.Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Compression.Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Compression.Algorithm LZO
public static final Compression.Algorithm GZ
public static final Compression.Algorithm NONE
public static final Compression.Algorithm SNAPPY
public static final Compression.Algorithm LZ4
public static final Compression.Algorithm BZIP2
public static final Compression.Algorithm ZSTD
public static final Compression.Algorithm LZMA
public static final Compression.Algorithm BROTLI
public static Compression.Algorithm[] values()
for (Compression.Algorithm c : Compression.Algorithm.values()) System.out.println(c);
public static Compression.Algorithm valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract org.apache.hadoop.io.compress.CompressionCodec reload(org.apache.hadoop.conf.Configuration conf)
NOTE: Experts only. This can only be done safely during process startup, before the algorithm's codecs are in use. If the codec implementation is changed, the new implementation may not be fully compatible with what was loaded at static initialization time, leading to potential data corruption. Mostly used by unit tests.
conf
- configurationpublic InputStream createDecompressionStream(InputStream downStream, org.apache.hadoop.io.compress.Decompressor decompressor, int downStreamBufferSize) throws IOException
IOException
public OutputStream createCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor, int downStreamBufferSize) throws IOException
IOException
public org.apache.hadoop.io.compress.CompressionOutputStream createPlainCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor) throws IOException
IOException
public org.apache.hadoop.io.compress.Compressor getCompressor()
public void returnCompressor(org.apache.hadoop.io.compress.Compressor compressor)
public org.apache.hadoop.io.compress.Decompressor getDecompressor()
public void returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.