Class ShardManagerTrivial

java.lang.Object
org.apache.cassandra.db.compaction.ShardManagerTrivial
All Implemented Interfaces:
ShardManager

public class ShardManagerTrivial extends Object implements ShardManager
  • Constructor Details

    • ShardManagerTrivial

      public ShardManagerTrivial(IPartitioner partitioner)
  • Method Details

    • isOutOfDate

      public boolean isOutOfDate(long ringVersion)
      Specified by:
      isOutOfDate in interface ShardManager
    • 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 interface ShardManager
    • rangeSpanned

      public double rangeSpanned(SSTableReader rdr)
      Description copied from interface: ShardManager
      Return 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:
      rangeSpanned in interface ShardManager
    • calculateCombinedDensity

      public double calculateCombinedDensity(Set<? extends SSTableReader> sstables)
      Description copied from interface: ShardManager
      Estimate the density of the sstable that will be the result of compacting the given sources.
      Specified by:
      calculateCombinedDensity in interface ShardManager
    • 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 interface ShardManager
    • 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 interface ShardManager
    • 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, see CompactionSimulationTest for a possible implementation.
      Specified by:
      boundaries in interface ShardManager