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 ShardSpecA 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 interfaceShardSpec.TypeShardSpec type names.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> PartitionChunk<T>createChunk(T obj)default shortgetAtomicUpdateGroupSize()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 intgetEndRootPartitionId()Returns the end root partition ID of the atomic update group which this segment belongs to.ShardSpecLookupgetLookup(List<? extends ShardSpec> shardSpecs)default shortgetMinorVersion()Returns the minor version associated to the atomic update group which this segment belongs to.intgetNumCorePartitions()intgetPartitionNum()Returns the partition ID of this segment.default intgetStartRootPartitionId()Returns 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.
-
-
-
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 givenPartialShardSpecshare the same partition space. All shardSpecs exceptOverwriteShardSpecuse the root-generation partition space and thus share the same space.- See Also:
PartitionIds
-
-