Class ShardManagerNoDisks
- java.lang.Object
-
- org.apache.cassandra.db.compaction.ShardManagerNoDisks
-
- All Implemented Interfaces:
ShardManager
- Direct Known Subclasses:
ShardManagerDiskAware
public class ShardManagerNoDisks extends java.lang.Object implements ShardManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ShardManagerNoDisks.BoundaryTracker
-
Field Summary
-
Fields inherited from interface org.apache.cassandra.db.compaction.ShardManager
MINIMUM_TOKEN_COVERAGE
-
-
Constructor Summary
Constructors Constructor Description ShardManagerNoDisks(ColumnFamilyStore.VersionedLocalRanges localRanges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShardTracker
boundaries(int shardCount)
Construct a boundary/shard iterator for the given number of shards.boolean
isOutOfDate(long ringVersion)
double
localSpaceCoverage()
The total fraction of the token space covered by the local ranges.double
rangeSpanned(Range<Token> tableRange)
The token range fraction spanned by the given range, adjusted for the local range ownership.double
shardSetCoverage()
The 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, wait
-
Methods inherited from interface org.apache.cassandra.db.compaction.ShardManager
calculateCombinedDensity, compareByDensity, density, rangeSpanned, rangeSpanned
-
-
-
-
Constructor Detail
-
ShardManagerNoDisks
public ShardManagerNoDisks(ColumnFamilyStore.VersionedLocalRanges localRanges)
-
-
Method Detail
-
isOutOfDate
public boolean isOutOfDate(long ringVersion)
- Specified by:
isOutOfDate
in interfaceShardManager
-
rangeSpanned
public double rangeSpanned(Range<Token> tableRange)
Description copied from interface:ShardManager
The token range fraction spanned by the given range, adjusted for the local range ownership.- Specified by:
rangeSpanned
in interfaceShardManager
-
localSpaceCoverage
public double localSpaceCoverage()
Description copied from interface:ShardManager
The total fraction of the token space covered by the local ranges.- Specified by:
localSpaceCoverage
in interfaceShardManager
-
shardSetCoverage
public double shardSetCoverage()
Description copied from interface:ShardManager
The 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:
shardSetCoverage
in interfaceShardManager
-
boundaries
public ShardTracker boundaries(int shardCount)
Description copied from interface:ShardManager
Construct 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, seeCompactionSimulationTest
for a possible implementation.- Specified by:
boundaries
in interfaceShardManager
-
-