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>
SeeBuildingShardSpecfor 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 HashBasedNumberedShardSpecconvert(int numCorePartitions)<T> PartitionChunk<T>createChunk(T obj)booleanequals(Object o)intgetBucketId()intgetNumBuckets()List<String>getPartitionDimensions()HashPartitionFunctiongetPartitionFunction()intgetPartitionNum()Returns the partition ID of this segment.StringgetType()Get the type name of this ShardSpec.inthashCode()StringtoString()-
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:ShardSpecReturns the partition ID of this segment.- Specified by:
getPartitionNumin interfaceShardSpec
-
getBucketId
public int getBucketId()
- Specified by:
getBucketIdin interfaceBuildingShardSpec<HashBasedNumberedShardSpec>
-
getNumBuckets
public int getNumBuckets()
-
getPartitionFunction
public HashPartitionFunction getPartitionFunction()
-
createChunk
public <T> PartitionChunk<T> createChunk(T obj)
- Specified by:
createChunkin interfaceShardSpec
-
convert
public HashBasedNumberedShardSpec convert(int numCorePartitions)
- Specified by:
convertin interfaceBuildingShardSpec<HashBasedNumberedShardSpec>
-
getType
public String getType()
Description copied from interface:ShardSpecGet the type name of this ShardSpec.
-
-