Class StatsMetadata

    • Field Detail

      • estimatedCellPerPartitionCount

        public final EstimatedHistogram estimatedCellPerPartitionCount
      • minTimestamp

        public final long minTimestamp
      • maxTimestamp

        public final long maxTimestamp
      • minLocalDeletionTime

        public final long minLocalDeletionTime
      • maxLocalDeletionTime

        public final long maxLocalDeletionTime
      • minTTL

        public final int minTTL
      • maxTTL

        public final int maxTTL
      • compressionRatio

        public final double compressionRatio
      • sstableLevel

        public final int sstableLevel
      • coveredClustering

        public final Slice coveredClustering
      • hasLegacyCounterShards

        public final boolean hasLegacyCounterShards
      • tokenSpaceCoverage

        public final double tokenSpaceCoverage
      • repairedAt

        public final long repairedAt
      • totalColumnsSet

        public final long totalColumnsSet
      • totalRows

        public final long totalRows
      • originatingHostId

        public final java.util.UUID originatingHostId
      • pendingRepair

        public final TimeUUID pendingRepair
      • isTransient

        public final boolean isTransient
      • hasPartitionLevelDeletions

        public final boolean hasPartitionLevelDeletions
        This boolean is used as an approximation of whether a given key can be guaranteed not to have partition deletions in this sstable. Obviously, this is pretty imprecise: a single partition deletion in the sstable means we have to assume _any_ key may have a partition deletion. This is still likely useful as workloads that does not use partition level deletions, or only very rarely, are probably not that rare. TODO we could replace this by a small bloom-filter instead; the only downside being that we'd have to care about the size of this bloom filters not getting out of hands, and it's a tiny bit unclear if it's worth the added complexity.
      • firstKey

        public final java.nio.ByteBuffer firstKey
      • lastKey

        public final java.nio.ByteBuffer lastKey
    • Constructor Detail

      • StatsMetadata

        public StatsMetadata​(EstimatedHistogram estimatedPartitionSize,
                             EstimatedHistogram estimatedCellPerPartitionCount,
                             IntervalSet<CommitLogPosition> commitLogIntervals,
                             long minTimestamp,
                             long maxTimestamp,
                             long minLocalDeletionTime,
                             long maxLocalDeletionTime,
                             int minTTL,
                             int maxTTL,
                             double compressionRatio,
                             TombstoneHistogram estimatedTombstoneDropTime,
                             int sstableLevel,
                             java.util.List<AbstractType<?>> clusteringTypes,
                             Slice coveredClustering,
                             boolean hasLegacyCounterShards,
                             long repairedAt,
                             long totalColumnsSet,
                             long totalRows,
                             double tokenSpaceCoverage,
                             java.util.UUID originatingHostId,
                             TimeUUID pendingRepair,
                             boolean isTransient,
                             boolean hasPartitionLevelDeletions,
                             java.nio.ByteBuffer firstKey,
                             java.nio.ByteBuffer lastKey)
    • Method Detail

      • getEstimatedDroppableTombstoneRatio

        public double getEstimatedDroppableTombstoneRatio​(long gcBefore)
        Parameters:
        gcBefore - gc time in seconds
        Returns:
        estimated droppable tombstone ratio at given gcBefore time.
      • getDroppableTombstonesBefore

        public double getDroppableTombstonesBefore​(long gcBefore)
        Parameters:
        gcBefore - gc time in seconds
        Returns:
        amount of droppable tombstones
      • mutateLevel

        public StatsMetadata mutateLevel​(int newLevel)
      • mutateRepairedMetadata

        public StatsMetadata mutateRepairedMetadata​(long newRepairedAt,
                                                    TimeUUID newPendingRepair,
                                                    boolean newIsTransient)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object