Class StatsMetadata
java.lang.Object
org.apache.cassandra.io.sstable.metadata.MetadataComponent
org.apache.cassandra.io.sstable.metadata.StatsMetadata
- All Implemented Interfaces:
Comparable<MetadataComponent>
SSTable metadata that always stay on heap.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal IntervalSet<CommitLogPosition>static final ISerializer<IntervalSet<CommitLogPosition>>final doublefinal Slicefinal EncodingStatsfinal EstimatedHistogramfinal EstimatedHistogramfinal TombstoneHistogramfinal ByteBufferfinal booleanfinal booleanThis boolean is used as an approximation of whether a given key can be guaranteed not to have partition deletions in this sstable.final booleanfinal ByteBufferfinal longfinal longfinal intfinal longfinal longfinal intfinal UUIDfinal TimeUUIDfinal longstatic final IMetadataComponentSerializerfinal intfinal doublefinal longfinal long -
Constructor Summary
ConstructorsConstructorDescriptionStatsMetadata(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, List<AbstractType<?>> clusteringTypes, Slice coveredClustering, boolean hasLegacyCounterShards, long repairedAt, long totalColumnsSet, long totalRows, double tokenSpaceCoverage, UUID originatingHostId, TimeUUID pendingRepair, boolean isTransient, boolean hasPartitionLevelDeletions, ByteBuffer firstKey, ByteBuffer lastKey) -
Method Summary
Modifier and TypeMethodDescriptionbooleandoublegetDroppableTombstonesBefore(long gcBefore) doublegetEstimatedDroppableTombstoneRatio(long gcBefore) getType()inthashCode()mutateLevel(int newLevel) mutateRepairedMetadata(long newRepairedAt, TimeUUID newPendingRepair, boolean newIsTransient) Methods inherited from class org.apache.cassandra.io.sstable.metadata.MetadataComponent
compareTo
-
Field Details
-
serializer
-
commitLogPositionSetSerializer
-
estimatedPartitionSize
-
estimatedCellPerPartitionCount
-
commitLogIntervals
-
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 -
estimatedTombstoneDropTime
-
sstableLevel
public final int sstableLevel -
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
-
pendingRepair
-
isTransient
public final boolean isTransient -
encodingStats
-
hasPartitionLevelDeletions
public final boolean hasPartitionLevelDeletionsThis 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
-
lastKey
-
-
Constructor Details
-
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, List<AbstractType<?>> clusteringTypes, Slice coveredClustering, boolean hasLegacyCounterShards, long repairedAt, long totalColumnsSet, long totalRows, double tokenSpaceCoverage, UUID originatingHostId, TimeUUID pendingRepair, boolean isTransient, boolean hasPartitionLevelDeletions, ByteBuffer firstKey, ByteBuffer lastKey)
-
-
Method Details
-
getType
- Specified by:
getTypein classMetadataComponent- Returns:
- Metadata component type
-
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
-
mutateRepairedMetadata
public StatsMetadata mutateRepairedMetadata(long newRepairedAt, TimeUUID newPendingRepair, boolean newIsTransient) -
equals
-
hashCode
public int hashCode()
-