Enum Class Compression.Algorithm
- All Implemented Interfaces:
Serializable
,Comparable<Compression.Algorithm>
,Constable
- Enclosing class:
- Compression
Compression algorithms. The ordinal of these cannot change or else you risk breaking all
existing HFiles out there. Even the ones that are not compressed! (They use the NONE algorithm)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final org.apache.hadoop.conf.Configuration
private final String
private final String
private static final int
data input buffer size to absorb small reads from application.private static final int
data output buffer size to absorb small writes from application. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCompressionStream
(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor, int downStreamBufferSize) 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.(package private) abstract org.apache.hadoop.io.compress.CompressionCodec
getCodec
(org.apache.hadoop.conf.Configuration conf) org.apache.hadoop.io.compress.Compressor
org.apache.hadoop.io.compress.Decompressor
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
Returns the enum constant of this class with the specified name.static Compression.Algorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LZO
-
GZ
-
NONE
-
SNAPPY
-
LZ4
-
BZIP2
-
ZSTD
-
LZMA
-
BROTLI
-
-
Field Details
-
conf
-
compressName
-
confKey
-
confDefault
-
DATA_IBUF_SIZE
data input buffer size to absorb small reads from application.- See Also:
-
DATA_OBUF_SIZE
data output buffer size to absorb small writes from application.- See Also:
-
-
Constructor Details
-
Algorithm
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getCodec
abstract org.apache.hadoop.io.compress.CompressionCodec getCodec(org.apache.hadoop.conf.Configuration conf) -
reload
public abstract org.apache.hadoop.io.compress.CompressionCodec reload(org.apache.hadoop.conf.Configuration conf) Reload configuration for the given algorithm.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.
- Parameters:
conf
- configuration
-
createDecompressionStream
public InputStream createDecompressionStream(InputStream downStream, org.apache.hadoop.io.compress.Decompressor decompressor, int downStreamBufferSize) throws IOException - Throws:
IOException
-
createCompressionStream
public OutputStream createCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor, int downStreamBufferSize) throws IOException - Throws:
IOException
-
createPlainCompressionStream
public org.apache.hadoop.io.compress.CompressionOutputStream createPlainCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor) throws IOException Creates a compression stream without any additional wrapping into buffering streams.- Throws:
IOException
-
getCompressor
-
returnCompressor
-
getDecompressor
-
returnDecompressor
-
getName
-