Class BuildingHashBasedNumberedShardSpec
- java.lang.Object
-
- org.apache.druid.timeline.partition.BuildingHashBasedNumberedShardSpec
-
- All Implemented Interfaces:
BuildingShardSpec<HashBasedNumberedShardSpec>
,ShardSpec
public class BuildingHashBasedNumberedShardSpec extends Object implements BuildingShardSpec<HashBasedNumberedShardSpec>
SeeBuildingShardSpec
for how this class is used.- See Also:
HashBasedNumberedShardSpec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.timeline.partition.ShardSpec
ShardSpec.Type
-
-
Constructor Summary
Constructors Constructor Description BuildingHashBasedNumberedShardSpec(int partitionId, 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 HashBasedNumberedShardSpec
convert(int numCorePartitions)
<T> PartitionChunk<T>
createChunk(T obj)
boolean
equals(Object o)
int
getBucketId()
int
getNumBuckets()
List<String>
getPartitionDimensions()
HashPartitionFunction
getPartitionFunction()
int
getPartitionNum()
Returns the partition ID of this segment.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.BuildingShardSpec
getDomainDimensions, getLookup, getNumCorePartitions, possibleInDomain
-
Methods inherited from interface org.apache.druid.timeline.partition.ShardSpec
getAtomicUpdateGroupSize, getEndRootPartitionId, getMinorVersion, getStartRootPartitionId, sharePartitionSpace
-
-
-
-
Constructor Detail
-
BuildingHashBasedNumberedShardSpec
public BuildingHashBasedNumberedShardSpec(int partitionId, int bucketId, int numBuckets, @Nullable List<String> partitionDimensions, HashPartitionFunction partitionFunction, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
-
Method Detail
-
getPartitionNum
public int getPartitionNum()
Description copied from interface:ShardSpec
Returns the partition ID of this segment.- Specified by:
getPartitionNum
in interfaceShardSpec
-
getBucketId
public int getBucketId()
- Specified by:
getBucketId
in interfaceBuildingShardSpec<HashBasedNumberedShardSpec>
-
getNumBuckets
public int getNumBuckets()
-
getPartitionFunction
public HashPartitionFunction getPartitionFunction()
-
createChunk
public <T> PartitionChunk<T> createChunk(T obj)
- Specified by:
createChunk
in interfaceShardSpec
-
convert
public HashBasedNumberedShardSpec convert(int numCorePartitions)
- Specified by:
convert
in interfaceBuildingShardSpec<HashBasedNumberedShardSpec>
-
getType
public String getType()
Description copied from interface:ShardSpec
Get the type name of this ShardSpec.
-
-