Class HashBucketShardSpec
- java.lang.Object
-
- org.apache.druid.timeline.partition.HashBucketShardSpec
-
- All Implemented Interfaces:
BucketNumberedShardSpec<BuildingHashBasedNumberedShardSpec>
,ShardSpec
public class HashBucketShardSpec extends Object implements BucketNumberedShardSpec<BuildingHashBasedNumberedShardSpec>
SeeBucketNumberedShardSpec
for how this class is used.- See Also:
BuildingHashBasedNumberedShardSpec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.timeline.partition.ShardSpec
ShardSpec.Type
-
-
Constructor Summary
Constructors Constructor Description HashBucketShardSpec(int bucketId, int numBuckets, List<String> partitionDimensions, HashPartitionFunction partitionFunction, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildingHashBasedNumberedShardSpec
convert(int partitionId)
boolean
equals(Object o)
int
getBucketId()
ShardSpecLookup
getLookup(List<? extends ShardSpec> shardSpecs)
int
getNumBuckets()
List<String>
getPartitionDimensions()
HashPartitionFunction
getPartitionFunction()
String
getType()
Get the type name of this ShardSpec.int
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.druid.timeline.partition.BucketNumberedShardSpec
createChunk, getDomainDimensions, getNumCorePartitions, getPartitionNum, possibleInDomain
-
Methods inherited from interface org.apache.druid.timeline.partition.ShardSpec
getAtomicUpdateGroupSize, getEndRootPartitionId, getMinorVersion, getStartRootPartitionId, sharePartitionSpace
-
-
-
-
Constructor Detail
-
HashBucketShardSpec
public HashBucketShardSpec(int bucketId, int numBuckets, List<String> partitionDimensions, HashPartitionFunction partitionFunction, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
-
Method Detail
-
getBucketId
public int getBucketId()
- Specified by:
getBucketId
in interfaceBucketNumberedShardSpec<BuildingHashBasedNumberedShardSpec>
-
getNumBuckets
public int getNumBuckets()
-
getPartitionFunction
public HashPartitionFunction getPartitionFunction()
-
convert
public BuildingHashBasedNumberedShardSpec convert(int partitionId)
- Specified by:
convert
in interfaceBucketNumberedShardSpec<BuildingHashBasedNumberedShardSpec>
-
getLookup
public ShardSpecLookup getLookup(List<? extends ShardSpec> shardSpecs)
-
getType
public String getType()
Description copied from interface:ShardSpec
Get the type name of this ShardSpec.
-
-