Package org.apache.druid.segment.data
Enum CompressionFactory.LongEncodingFormat
- java.lang.Object
-
- java.lang.Enum<CompressionFactory.LongEncodingFormat>
-
- org.apache.druid.segment.data.CompressionFactory.LongEncodingFormat
-
- All Implemented Interfaces:
Serializable
,Comparable<CompressionFactory.LongEncodingFormat>
- Enclosing class:
- CompressionFactory
public static enum CompressionFactory.LongEncodingFormat extends Enum<CompressionFactory.LongEncodingFormat>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DELTA
DELTA format encodes a series of longs by finding the smallest value first, and stores all values as offset to the smallest value.LONGS
LONGS format encodes longs as is, using 8 bytes for each value.TABLE
TABLE format encodes a series of longs by mapping each unique value to an id, and string the id with the minimum number of bits similar to how DELTA stores offset.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CompressionFactory.LongEncodingFormat
forId(byte id)
byte
getId()
abstract CompressionFactory.LongEncodingReader
getReader(ByteBuffer buffer, ByteOrder order)
static CompressionFactory.LongEncodingFormat
valueOf(String name)
Returns the enum constant of this type with the specified name.static CompressionFactory.LongEncodingFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DELTA
public static final CompressionFactory.LongEncodingFormat DELTA
DELTA format encodes a series of longs by finding the smallest value first, and stores all values as offset to the smallest value. The maximum value is also found to calculate how many bits are required to store each offset usingVSizeLongSerde
.
-
TABLE
public static final CompressionFactory.LongEncodingFormat TABLE
TABLE format encodes a series of longs by mapping each unique value to an id, and string the id with the minimum number of bits similar to how DELTA stores offset. TABLE format is only applicable to values with less unique values thanCompressionFactory.MAX_TABLE_SIZE
.
-
LONGS
public static final CompressionFactory.LongEncodingFormat LONGS
LONGS format encodes longs as is, using 8 bytes for each value.
-
-
Method Detail
-
values
public static CompressionFactory.LongEncodingFormat[] 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 (CompressionFactory.LongEncodingFormat c : CompressionFactory.LongEncodingFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionFactory.LongEncodingFormat 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()
-
getReader
public abstract CompressionFactory.LongEncodingReader getReader(ByteBuffer buffer, ByteOrder order)
-
forId
public static CompressionFactory.LongEncodingFormat forId(byte id)
-
-