Class StatsMetadata
- java.lang.Object
-
- org.apache.cassandra.io.sstable.metadata.MetadataComponent
-
- org.apache.cassandra.io.sstable.metadata.StatsMetadata
-
- All Implemented Interfaces:
java.lang.Comparable<MetadataComponent>
public class StatsMetadata extends MetadataComponent
SSTable metadata that always stay on heap.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStatsMetadata.StatsMetadataSerializer
-
Field Summary
Fields Modifier and Type Field Description IntervalSet<CommitLogPosition>commitLogIntervalsstatic ISerializer<IntervalSet<CommitLogPosition>>commitLogPositionSetSerializerdoublecompressionRatioEncodingStatsencodingStatsEstimatedHistogramestimatedCellPerPartitionCountEstimatedHistogramestimatedPartitionSizeTombstoneHistogramestimatedTombstoneDropTimebooleanhasLegacyCounterShardsbooleanisTransientjava.util.List<java.nio.ByteBuffer>maxClusteringValuesintmaxLocalDeletionTimelongmaxTimestampintmaxTTLjava.util.List<java.nio.ByteBuffer>minClusteringValuesintminLocalDeletionTimelongminTimestampintminTTLjava.util.UUIDoriginatingHostIdTimeUUIDpendingRepairlongrepairedAtstatic IMetadataComponentSerializerserializerintsstableLevellongtotalColumnsSetlongtotalRows
-
Constructor Summary
Constructors Constructor Description StatsMetadata(EstimatedHistogram estimatedPartitionSize, EstimatedHistogram estimatedCellPerPartitionCount, IntervalSet<CommitLogPosition> commitLogIntervals, long minTimestamp, long maxTimestamp, int minLocalDeletionTime, int maxLocalDeletionTime, int minTTL, int maxTTL, double compressionRatio, TombstoneHistogram estimatedTombstoneDropTime, int sstableLevel, java.util.List<java.nio.ByteBuffer> minClusteringValues, java.util.List<java.nio.ByteBuffer> maxClusteringValues, boolean hasLegacyCounterShards, long repairedAt, long totalColumnsSet, long totalRows, java.util.UUID originatingHostId, TimeUUID pendingRepair, boolean isTransient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)doublegetDroppableTombstonesBefore(int gcBefore)doublegetEstimatedDroppableTombstoneRatio(int gcBefore)MetadataTypegetType()inthashCode()StatsMetadatamutateLevel(int newLevel)StatsMetadatamutateRepairedMetadata(long newRepairedAt, TimeUUID newPendingRepair, boolean newIsTransient)-
Methods inherited from class org.apache.cassandra.io.sstable.metadata.MetadataComponent
compareTo
-
-
-
-
Field Detail
-
serializer
public static final IMetadataComponentSerializer serializer
-
commitLogPositionSetSerializer
public static final ISerializer<IntervalSet<CommitLogPosition>> commitLogPositionSetSerializer
-
estimatedPartitionSize
public final EstimatedHistogram estimatedPartitionSize
-
estimatedCellPerPartitionCount
public final EstimatedHistogram estimatedCellPerPartitionCount
-
commitLogIntervals
public final IntervalSet<CommitLogPosition> commitLogIntervals
-
minTimestamp
public final long minTimestamp
-
maxTimestamp
public final long maxTimestamp
-
minLocalDeletionTime
public final int minLocalDeletionTime
-
maxLocalDeletionTime
public final int maxLocalDeletionTime
-
minTTL
public final int minTTL
-
maxTTL
public final int maxTTL
-
compressionRatio
public final double compressionRatio
-
estimatedTombstoneDropTime
public final TombstoneHistogram estimatedTombstoneDropTime
-
sstableLevel
public final int sstableLevel
-
minClusteringValues
public final java.util.List<java.nio.ByteBuffer> minClusteringValues
-
maxClusteringValues
public final java.util.List<java.nio.ByteBuffer> maxClusteringValues
-
hasLegacyCounterShards
public final boolean hasLegacyCounterShards
-
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
-
encodingStats
public final EncodingStats encodingStats
-
-
Constructor Detail
-
StatsMetadata
public StatsMetadata(EstimatedHistogram estimatedPartitionSize, EstimatedHistogram estimatedCellPerPartitionCount, IntervalSet<CommitLogPosition> commitLogIntervals, long minTimestamp, long maxTimestamp, int minLocalDeletionTime, int maxLocalDeletionTime, int minTTL, int maxTTL, double compressionRatio, TombstoneHistogram estimatedTombstoneDropTime, int sstableLevel, java.util.List<java.nio.ByteBuffer> minClusteringValues, java.util.List<java.nio.ByteBuffer> maxClusteringValues, boolean hasLegacyCounterShards, long repairedAt, long totalColumnsSet, long totalRows, java.util.UUID originatingHostId, TimeUUID pendingRepair, boolean isTransient)
-
-
Method Detail
-
getType
public MetadataType getType()
- Specified by:
getTypein classMetadataComponent- Returns:
- Metadata component type
-
getEstimatedDroppableTombstoneRatio
public double getEstimatedDroppableTombstoneRatio(int gcBefore)
- Parameters:
gcBefore- gc time in seconds- Returns:
- estimated droppable tombstone ratio at given gcBefore time.
-
getDroppableTombstonesBefore
public double getDroppableTombstonesBefore(int 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-