Package org.apache.druid.segment.data
Enum CompressionStrategy
- java.lang.Object
-
- java.lang.Enum<CompressionStrategy>
-
- org.apache.druid.segment.data.CompressionStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<CompressionStrategy>
public enum CompressionStrategy extends Enum<CompressionStrategy>
Compression strategy is used to compress block of bytes without knowledge of what data the bytes represents. When adding compression strategy, do not use id in the range [0x7C, 0xFD] (greater than 123 or less than -2), since a flag mechanism is used in CompressionFactory that involves subtracting the value 126 from the compression id (seeCompressionFactory.FLAG_BOUND)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompressionStrategy.Compressorstatic interfaceCompressionStrategy.Decompressorstatic classCompressionStrategy.LZ4Compressorstatic classCompressionStrategy.LZ4Decompressorstatic classCompressionStrategy.LZFCompressorstatic classCompressionStrategy.LZFDecompressorstatic classCompressionStrategy.UncompressedCompressorstatic classCompressionStrategy.UncompressedDecompressorstatic classCompressionStrategy.ZstdCompressorstatic classCompressionStrategy.ZstdDecompressor
-
Enum Constant Summary
Enum Constants Enum Constant Description LZ4LZFNONEThis value indicate no compression strategy should be used, and compression should not be block based.UNCOMPRESSEDZSTD
-
Field Summary
Fields Modifier and Type Field Description static CompressionStrategyDEFAULT_COMPRESSION_STRATEGY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CompressionStrategyforId(byte id)static CompressionStrategyfromString(String name)abstract CompressionStrategy.CompressorgetCompressor()abstract CompressionStrategy.DecompressorgetDecompressor()bytegetId()static CompressionStrategy[]noNoneValues()StringtoString()static CompressionStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static CompressionStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LZF
public static final CompressionStrategy LZF
-
LZ4
public static final CompressionStrategy LZ4
-
ZSTD
public static final CompressionStrategy ZSTD
-
UNCOMPRESSED
public static final CompressionStrategy UNCOMPRESSED
-
NONE
public static final CompressionStrategy NONE
This value indicate no compression strategy should be used, and compression should not be block based.ColumnarLongs,ColumnarFloatsandColumnarDoublessupport non block based compression, and other types treat this asUNCOMPRESSED.
-
-
Field Detail
-
DEFAULT_COMPRESSION_STRATEGY
public static final CompressionStrategy DEFAULT_COMPRESSION_STRATEGY
-
-
Method Detail
-
values
public static CompressionStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressionStrategy c : CompressionStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getId
public byte getId()
-
getCompressor
public abstract CompressionStrategy.Compressor getCompressor()
-
getDecompressor
public abstract CompressionStrategy.Decompressor getDecompressor()
-
toString
public String toString()
- Overrides:
toStringin classEnum<CompressionStrategy>
-
fromString
public static CompressionStrategy fromString(String name)
-
forId
public static CompressionStrategy forId(byte id)
-
noNoneValues
public static CompressionStrategy[] noNoneValues()
-
-