Enum SecondaryPartitionType
- java.lang.Object
-
- java.lang.Enum<SecondaryPartitionType>
-
- org.apache.druid.indexer.partitions.SecondaryPartitionType
-
- All Implemented Interfaces:
Serializable
,Comparable<SecondaryPartitionType>
public enum SecondaryPartitionType extends Enum<SecondaryPartitionType>
In Druid, ingested data are primarily partitioned based on time range (@link GranularitySpec#getSegmentGranularity), and then secondly partitioned based on the givenPartitionsSpec
. This enum lists all supported types for the secondary partitioning.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HASH
Hash partitioning partitions segments in the same time chunk based on the hash value of the partition dimensions.LINEAR
Linear partitioning partitions segments in the same time chunk based on their size or number of rows in them.RANGE
Range partitioning partitions segments in the same time chunk based on the value range of the partition dimension.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SecondaryPartitionType
valueOf(String name)
Returns the enum constant of this type with the specified name.static SecondaryPartitionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINEAR
public static final SecondaryPartitionType LINEAR
Linear partitioning partitions segments in the same time chunk based on their size or number of rows in them.- See Also:
DynamicPartitionsSpec
,NumberedShardSpec
-
HASH
public static final SecondaryPartitionType HASH
Hash partitioning partitions segments in the same time chunk based on the hash value of the partition dimensions.- See Also:
HashedPartitionsSpec
,HashBasedNumberedShardSpec
-
RANGE
public static final SecondaryPartitionType RANGE
Range partitioning partitions segments in the same time chunk based on the value range of the partition dimension.
-
-
Method Detail
-
values
public static SecondaryPartitionType[] 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 (SecondaryPartitionType c : SecondaryPartitionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SecondaryPartitionType 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
-
-