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>
See
BuildingShardSpec for how this class is used.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.timeline.partition.ShardSpec
ShardSpec.Type -
Constructor Summary
ConstructorsConstructorDescriptionBuildingHashBasedNumberedShardSpec(int partitionId, int bucketId, int numBuckets, List<String> partitionDimensions, HashPartitionFunction partitionFunction, com.fasterxml.jackson.databind.ObjectMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionconvert(int numCorePartitions) <T> PartitionChunk<T>createChunk(T obj) booleanintintintReturns the partition ID of this segment.getType()Get the type name of this ShardSpec.inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.timeline.partition.BuildingShardSpec
getDomainDimensions, getLookup, getNumCorePartitions, possibleInDomainMethods inherited from interface org.apache.druid.timeline.partition.ShardSpec
canCreateNumberedPartitionChunk, getAtomicUpdateGroupSize, getDomainVirtualColumns, getEndRootPartitionId, getMinorVersion, getStartRootPartitionId, sharePartitionSpace, withCorePartitions, withPartitionNum
-
Constructor Details
-
BuildingHashBasedNumberedShardSpec
public BuildingHashBasedNumberedShardSpec(int partitionId, int bucketId, int numBuckets, @Nullable List<String> partitionDimensions, HashPartitionFunction partitionFunction, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
-
Method Details
-
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() -
getPartitionDimensions
-
getPartitionFunction
-
createChunk
- Specified by:
createChunkin interfaceShardSpec
-
convert
- Specified by:
convertin interfaceBuildingShardSpec<HashBasedNumberedShardSpec>
-
getType
Description copied from interface:ShardSpecGet the type name of this ShardSpec. -
equals
-
hashCode
public int hashCode() -
toString
-