Class Compression
java.lang.Object
org.apache.hadoop.hbase.io.compress.Compression
Compression related stuff. Copied from hadoop-3315 tfile.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCompression algorithms.(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.io.compress.CompressionCodecbuildCodec(org.apache.hadoop.conf.Configuration conf, Compression.Algorithm algo) Load a codec implementation for an algorithm using the supplied configuration.private static ClassLoaderReturns the classloader to load the Codec class from.static Compression.AlgorithmgetCompressionAlgorithmByName(String compressName) static String[]Get names of supported compression algorithms.static void
-
Field Details
-
LOG
-
LZO_CODEC_CLASS_KEY
- See Also:
-
LZO_CODEC_CLASS_DEFAULT
- See Also:
-
GZ_CODEC_CLASS_KEY
- See Also:
-
GZ_CODEC_CLASS_DEFAULT
- See Also:
-
SNAPPY_CODEC_CLASS_KEY
- See Also:
-
SNAPPY_CODEC_CLASS_DEFAULT
- See Also:
-
LZ4_CODEC_CLASS_KEY
- See Also:
-
LZ4_CODEC_CLASS_DEFAULT
- See Also:
-
ZSTD_CODEC_CLASS_KEY
- See Also:
-
ZSTD_CODEC_CLASS_DEFAULT
- See Also:
-
BZIP2_CODEC_CLASS_KEY
- See Also:
-
BZIP2_CODEC_CLASS_DEFAULT
- See Also:
-
LZMA_CODEC_CLASS_KEY
- See Also:
-
LZMA_CODEC_CLASS_DEFAULT
- See Also:
-
BROTLI_CODEC_CLASS_KEY
- See Also:
-
BROTLI_CODEC_CLASS_DEFAULT
- See Also:
-
-
Constructor Details
-
Compression
private Compression()Prevent the instantiation of class.
-
-
Method Details
-
getClassLoaderForCodec
Returns the classloader to load the Codec class from. -
getCompressionAlgorithmByName
-
getSupportedAlgorithms
Get names of supported compression algorithms.- Returns:
- Array of strings, each represents a supported compression algorithm. Currently, the following compression algorithms are supported.
-
buildCodec
private static org.apache.hadoop.io.compress.CompressionCodec buildCodec(org.apache.hadoop.conf.Configuration conf, Compression.Algorithm algo) Load a codec implementation for an algorithm using the supplied configuration.- Parameters:
conf- the configuration to usealgo- the algorithm to implement
-
main
- Throws:
Exception
-