Class HashBasedNumberedPartialShardSpec
java.lang.Object
org.apache.druid.timeline.partition.HashBasedNumberedPartialShardSpec
- All Implemented Interfaces:
PartialShardSpec
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHashBasedNumberedPartialShardSpec(List<String> partitionDimensions, int bucketId, int numBuckets, HashPartitionFunction partitionFunction) -
Method Summary
Modifier and TypeMethodDescriptioncomplete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions) Creates a new ShardSpec with given partitionId and numCorePartitions.booleanintintReturns the class of the shardSpec created by this factory.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.timeline.partition.PartialShardSpec
useNonRootGenerationPartitionSpace
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
HashBasedNumberedPartialShardSpec
public HashBasedNumberedPartialShardSpec(@Nullable List<String> partitionDimensions, int bucketId, int numBuckets, @Nullable HashPartitionFunction partitionFunction)
-
-
Method Details
-
getPartitionDimensions
-
getBucketId
public int getBucketId() -
getNumBuckets
public int getNumBuckets() -
getPartitionFunction
-
complete
public ShardSpec complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions) Description copied from interface:PartialShardSpecCreates a new ShardSpec with given partitionId and numCorePartitions.- Specified by:
completein interfacePartialShardSpec- Parameters:
objectMapper- jsonMapper used only forHashBasedNumberedShardSpecpartitionId- partitionId of the shardSpec. must be carefully chosen to be unique in a time chunknumCorePartitions- the core partition set size. Should be set properly to determine if this segment belongs to the core partitions.
-
getShardSpecClass
Description copied from interface:PartialShardSpecReturns the class of the shardSpec created by this factory.- Specified by:
getShardSpecClassin interfacePartialShardSpec
-
equals
-
hashCode
public int hashCode()
-