Interface PartialShardSpec

All Known Implementing Classes:
HashBasedNumberedPartialShardSpec, LinearPartialShardSpec, NumberedOverwritePartialShardSpec, NumberedPartialShardSpec, SingleDimensionPartialShardSpec

public interface PartialShardSpec
This interface is used in the segment allocation protocol when it is coordinated by the Overlord; when appending segments to an existing datasource (either streaming ingestion or batch append) or any case when segment lock is used. The implementations of this interface contain all information of the corresponding ShardSpec except the partition ID. The ingestion tasks send all information required for allocating a new segment using this interface and the Overlord determines the partition ID to create a new segment.
  • Method Summary

    Modifier and Type
    Method
    Description
    complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions)
    Creates a new ShardSpec with given partitionId and numCorePartitions.
    Class<? extends ShardSpec>
    Returns the class of the shardSpec created by this factory.
    default boolean
    Returns true if this partialShardSpec needs a partitionId of a non-root generation.
  • Method Details

    • complete

      ShardSpec complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions)
      Creates a new ShardSpec with given partitionId and numCorePartitions.
      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

      Class<? extends ShardSpec> getShardSpecClass()
      Returns the class of the shardSpec created by this factory.
    • useNonRootGenerationPartitionSpace

      default boolean useNonRootGenerationPartitionSpace()
      Returns true if this partialShardSpec needs a partitionId of a non-root generation. Any partialShardSpec to overwrite a subset of segments in a time chunk such as NumberedOverwritePartialShardSpec should return true.
      See Also: