Package org.apache.druid.segment.data
Enum CompressionFactory.LongEncodingStrategy
- java.lang.Object
-
- java.lang.Enum<CompressionFactory.LongEncodingStrategy>
-
- org.apache.druid.segment.data.CompressionFactory.LongEncodingStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<CompressionFactory.LongEncodingStrategy>
- Enclosing class:
- CompressionFactory
public static enum CompressionFactory.LongEncodingStrategy extends Enum<CompressionFactory.LongEncodingStrategy>
The compression of decompression of encodings are separated into different enums. EncodingStrategy refers to the strategy used to encode the data, and EncodingFormat refers to the format the data is encoded in. Note there is not necessarily an one-to-one mapping between to two. For instance, the AUTO LongEncodingStrategy scans the data once and decide on which LongEncodingFormat to use based on data property, so it's possible for the EncodingStrategy to write in any of the LongEncodingFormat. On the other hand, there are no LongEncodingStrategy that always write in TABLE LongEncodingFormat since it only works for data with low cardinality.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompressionFactory.LongEncodingStrategy
fromString(String name)
String
toString()
static CompressionFactory.LongEncodingStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static CompressionFactory.LongEncodingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO
public static final CompressionFactory.LongEncodingStrategy AUTO
AUTO strategy scans all values once before encoding them. It stores the value cardinality and maximum offset of the values to determine whether to use DELTA, TABLE, or LONGS format.
-
LONGS
public static final CompressionFactory.LongEncodingStrategy LONGS
LONGS strategy always encode the values using LONGS format
-
-
Method Detail
-
values
public static CompressionFactory.LongEncodingStrategy[] 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.LongEncodingStrategy c : CompressionFactory.LongEncodingStrategy.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.LongEncodingStrategy 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
-
toString
public String toString()
- Overrides:
toString
in classEnum<CompressionFactory.LongEncodingStrategy>
-
fromString
public static CompressionFactory.LongEncodingStrategy fromString(String name)
-
-