Interface ShardSpec

All Known Subinterfaces:
BucketNumberedShardSpec<T>, BuildingShardSpec<T>, OverwriteShardSpec
All Known Implementing Classes:
BaseDimensionRangeShardSpec, BuildingDimensionRangeShardSpec, BuildingHashBasedNumberedShardSpec, BuildingNumberedShardSpec, BuildingSingleDimensionShardSpec, DimensionRangeBucketShardSpec, DimensionRangeShardSpec, HashBasedNumberedShardSpec, HashBucketShardSpec, LinearShardSpec, NoneShardSpec, NumberedOverwriteShardSpec, NumberedShardSpec, SingleDimensionRangeBucketShardSpec, SingleDimensionShardSpec, TombstoneShardSpec

public interface ShardSpec
A Marker interface that exists to combine ShardSpec objects together for Jackson. Note that this is not an extension API. Extensions are not expected to create new kinds of ShardSpecs.
  • Method Details

    • createChunk

      <T> PartitionChunk<T> createChunk(T obj)
    • getPartitionNum

      int getPartitionNum()
      Returns the partition ID of this segment.
    • getNumCorePartitions

      int getNumCorePartitions()
    • getStartRootPartitionId

      default int getStartRootPartitionId()
      Returns the start root partition ID of the atomic update group which this segment belongs to.
      See Also:
      • AtomicUpdateGroup
    • getEndRootPartitionId

      default int getEndRootPartitionId()
      Returns the end root partition ID of the atomic update group which this segment belongs to.
      See Also:
      • AtomicUpdateGroup
    • getMinorVersion

      default short getMinorVersion()
      Returns the minor version associated to the atomic update group which this segment belongs to.
      See Also:
      • AtomicUpdateGroup
    • getAtomicUpdateGroupSize

      default short getAtomicUpdateGroupSize()
      Returns the atomic update group size which this segment belongs to.
      See Also:
      • AtomicUpdateGroup
    • getLookup

      ShardSpecLookup getLookup(List<? extends ShardSpec> shardSpecs)
    • getDomainDimensions

      List<String> getDomainDimensions()
      Get dimensions who have possible range for the rows this shard contains.
      Returns:
      list of dimensions who has its possible range. Dimensions with unknown possible range are not listed
    • possibleInDomain

      boolean possibleInDomain(Map<String,com.google.common.collect.RangeSet<String>> domain)
      if given domain ranges are not possible in this shard, return false; otherwise return true;
      Returns:
      possibility of in domain
    • getType

      default String getType()
      Get the type name of this ShardSpec.
    • sharePartitionSpace

      default boolean sharePartitionSpace(PartialShardSpec partialShardSpec)
      Returns true if this shardSpec and the given PartialShardSpec share the same partition space. All shardSpecs except OverwriteShardSpec use the root-generation partition space and thus share the same space.
      See Also: