Class HashBasedNumberedPartialShardSpec

java.lang.Object
org.apache.druid.timeline.partition.HashBasedNumberedPartialShardSpec
All Implemented Interfaces:
PartialShardSpec

public class HashBasedNumberedPartialShardSpec extends Object implements PartialShardSpec
  • Field Details

  • Constructor Details

    • HashBasedNumberedPartialShardSpec

      public HashBasedNumberedPartialShardSpec(@Nullable List<String> partitionDimensions, int bucketId, int numBuckets, @Nullable HashPartitionFunction partitionFunction)
  • Method Details

    • getPartitionDimensions

      @Nullable public List<String> getPartitionDimensions()
    • getBucketId

      public int getBucketId()
    • getNumBuckets

      public int getNumBuckets()
    • getPartitionFunction

      @Nullable public HashPartitionFunction getPartitionFunction()
    • complete

      public ShardSpec complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions)
      Description copied from interface: PartialShardSpec
      Creates a new ShardSpec with given partitionId and numCorePartitions.
      Specified by:
      complete in interface PartialShardSpec
      Parameters:
      objectMapper - jsonMapper used only for HashBasedNumberedShardSpec
      partitionId - partitionId of the shardSpec. must be carefully chosen to be unique in a time chunk
      numCorePartitions - the core partition set size. Should be set properly to determine if this segment belongs to the core partitions.
    • getShardSpecClass

      public Class<? extends ShardSpec> getShardSpecClass()
      Description copied from interface: PartialShardSpec
      Returns the class of the shardSpec created by this factory.
      Specified by:
      getShardSpecClass in interface PartialShardSpec
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object