Class ShardManagerTrivial
java.lang.Object
org.apache.cassandra.db.compaction.ShardManagerTrivial
- All Implemented Interfaces:
ShardManager
-
Field Summary
Fields inherited from interface org.apache.cassandra.db.compaction.ShardManager
MINIMUM_TOKEN_COVERAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboundaries(int shardCount) Construct a boundary/shard iterator for the given number of shards.doublecalculateCombinedDensity(Set<? extends SSTableReader> sstables) Estimate the density of the sstable that will be the result of compacting the given sources.booleanisOutOfDate(long ringVersion) doubleThe total fraction of the token space covered by the local ranges.doublerangeSpanned(Range<Token> tableRange) The token range fraction spanned by the given range, adjusted for the local range ownership.doubleReturn the token space share that the given SSTable spans, excluding any non-locally owned space.doubleThe fraction of the token space covered by a shard set, i.e.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.db.compaction.ShardManager
compareByDensity, density, rangeSpanned
-
Constructor Details
-
ShardManagerTrivial
-
-
Method Details
-
isOutOfDate
public boolean isOutOfDate(long ringVersion) - Specified by:
isOutOfDatein interfaceShardManager
-
rangeSpanned
Description copied from interface:ShardManagerThe token range fraction spanned by the given range, adjusted for the local range ownership.- Specified by:
rangeSpannedin interfaceShardManager
-
rangeSpanned
Description copied from interface:ShardManagerReturn the token space share that the given SSTable spans, excluding any non-locally owned space. Returns a positive floating-point number between 0 and 1.- Specified by:
rangeSpannedin interfaceShardManager
-
calculateCombinedDensity
Description copied from interface:ShardManagerEstimate the density of the sstable that will be the result of compacting the given sources.- Specified by:
calculateCombinedDensityin interfaceShardManager
-
localSpaceCoverage
public double localSpaceCoverage()Description copied from interface:ShardManagerThe total fraction of the token space covered by the local ranges.- Specified by:
localSpaceCoveragein interfaceShardManager
-
shardSetCoverage
public double shardSetCoverage()Description copied from interface:ShardManagerThe fraction of the token space covered by a shard set, i.e. the space that is split in the requested number of shards. If no disks are defined, this is the same as localSpaceCoverage(). Otherwise, it is the token coverage of a disk.- Specified by:
shardSetCoveragein interfaceShardManager
-
boundaries
Description copied from interface:ShardManagerConstruct a boundary/shard iterator for the given number of shards. Note: This does not offer a method of listing the shard boundaries it generates, just to advance to the corresponding one for a given token. The only usage for listing is currently in tests. Should a need for this arise, seeCompactionSimulationTestfor a possible implementation.- Specified by:
boundariesin interfaceShardManager
-