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 class
CompressionStrategy.Compressor
static interface
CompressionStrategy.Decompressor
static class
CompressionStrategy.LZ4Compressor
static class
CompressionStrategy.LZ4Decompressor
static class
CompressionStrategy.LZFCompressor
static class
CompressionStrategy.LZFDecompressor
static class
CompressionStrategy.UncompressedCompressor
static class
CompressionStrategy.UncompressedDecompressor
static class
CompressionStrategy.ZstdCompressor
static class
CompressionStrategy.ZstdDecompressor
-
Enum Constant Summary
Enum Constants Enum Constant Description LZ4
LZF
NONE
This value indicate no compression strategy should be used, and compression should not be block based.UNCOMPRESSED
ZSTD
-
Field Summary
Fields Modifier and Type Field Description static CompressionStrategy
DEFAULT_COMPRESSION_STRATEGY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CompressionStrategy
forId(byte id)
static CompressionStrategy
fromString(String name)
abstract CompressionStrategy.Compressor
getCompressor()
abstract CompressionStrategy.Decompressor
getDecompressor()
byte
getId()
static CompressionStrategy[]
noNoneValues()
String
toString()
static CompressionStrategy
valueOf(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
,ColumnarFloats
andColumnarDoubles
support 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:
toString
in classEnum<CompressionStrategy>
-
fromString
public static CompressionStrategy fromString(String name)
-
forId
public static CompressionStrategy forId(byte id)
-
noNoneValues
public static CompressionStrategy[] noNoneValues()
-
-