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 Modifier and Type Interface Description static interface
ShardSpec.Type
ShardSpec type names.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> PartitionChunk<T>
createChunk(T obj)
default short
getAtomicUpdateGroupSize()
Returns the atomic update group size which this segment belongs to.List<String>
getDomainDimensions()
Get dimensions who have possible range for the rows this shard contains.default int
getEndRootPartitionId()
Returns the end root partition ID of the atomic update group which this segment belongs to.ShardSpecLookup
getLookup(List<? extends ShardSpec> shardSpecs)
default short
getMinorVersion()
Returns the minor version associated to the atomic update group which this segment belongs to.int
getNumCorePartitions()
int
getPartitionNum()
Returns the partition ID of this segment.default int
getStartRootPartitionId()
Returns the start root partition ID of the atomic update group which this segment belongs to.default String
getType()
Get the type name of this ShardSpec.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;default boolean
sharePartitionSpace(PartialShardSpec partialShardSpec)
Returns true if this shardSpec and the givenPartialShardSpec
share the same partition space.
-
-
-
Method Detail
-
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 givenPartialShardSpec
share the same partition space. All shardSpecs exceptOverwriteShardSpec
use the root-generation partition space and thus share the same space.- See Also:
PartitionIds
-
-