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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns whethercreateChunk(T)returns aNumberedPartitionChunkinstance.<T> PartitionChunk<T>createChunk(T obj) default shortReturns the atomic update group size which this segment belongs to.Get dimensions who have possible range for the rows this shard contains.default VirtualColumnsIf any of the columns ingetDomainDimensions()was computed with an expression and was not stored, theVirtualColumnwhich computes it is stored here.default intReturns the end root partition ID of the atomic update group which this segment belongs to.default shortReturns the minor version associated to the atomic update group which this segment belongs to.intintReturns the partition ID of this segment.default intReturns the start root partition ID of the atomic update group which this segment belongs to.default StringgetType()Get the type name of this ShardSpec.booleanpossibleInDomain(Map<String, com.google.common.collect.RangeSet<String>> domain) if given domain ranges are not possible in this shard, return false; otherwise return true;default booleansharePartitionSpace(PartialShardSpec partialShardSpec) Returns true if this shardSpec and the givenPartialShardSpecshare the same partition space.default ShardSpecwithCorePartitions(int partitions) Creates a new ShardSpec with the specified number of core partitions.default ShardSpecwithPartitionNum(int partitionNum) Creates a new ShardSpec with the specified partition number.
-
Method Details
-
canCreateNumberedPartitionChunk
default boolean canCreateNumberedPartitionChunk()Returns whethercreateChunk(T)returns aNumberedPartitionChunkinstance. This is necessary for supportingPartitionHolder.isComplete()if updating to a new corePartitions spec. -
createChunk
-
getPartitionNum
int getPartitionNum()Returns the partition ID of this segment. -
getNumCorePartitions
int getNumCorePartitions() -
withPartitionNum
Creates a new ShardSpec with the specified partition number. -
withCorePartitions
Creates a new ShardSpec with the specified number of core partitions. -
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
-
getDomainDimensions
Get dimensions who have possible range for the rows this shard contains. These columns might be physical columns stored in the shard, or computed expressions, in which case the manner in which they were computed is available ingetDomainVirtualColumns().- Returns:
- list of dimensions who has its possible range. Dimensions with unknown possible range are not listed.
-
getDomainVirtualColumns
If any of the columns ingetDomainDimensions()was computed with an expression and was not stored, theVirtualColumnwhich computes it is stored here. This allows matching ranges even when the value is not stored in the shard so long asVirtualColumns.findEquivalent(VirtualColumns, VirtualColumn)exists.- Returns:
VirtualColumnsassociated with columns listed ingetDomainDimensions().
-
possibleInDomain
if given domain ranges are not possible in this shard, return false; otherwise return true;- Returns:
- possibility of in domain
-
getType
Get the type name of this ShardSpec.
-