Enum HashPartitionFunction
- All Implemented Interfaces:
Serializable,Comparable<HashPartitionFunction>
An enum of supported hash partition functions. This enum should be updated when we want to use a new function
for hash partitioning. All partition functions listed in this enum must be backwards-compatible as the hash
function should apply to all segments in the same way no matter what Druid version was used to create those segments.
This function is a part of
HashBasedNumberedShardSpec which is stored in the metadata store.-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HashPartitionFunctionfromString(String type) abstract inthash(byte[] serializedRow, int numBuckets) Returns an ID of a hash bucket for the givenserializedRow.toString()static HashPartitionFunctionReturns the enum constant of this type with the specified name.static HashPartitionFunction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MURMUR3_32_ABS
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
hash
public abstract int hash(byte[] serializedRow, int numBuckets) Returns an ID of a hash bucket for the givenserializedRow. -
fromString
-
toString
- Overrides:
toStringin classEnum<HashPartitionFunction>
-