Class MetadataCollector
java.lang.Object
org.apache.cassandra.io.sstable.metadata.MetadataCollector
- All Implemented Interfaces:
PartitionStatisticsCollector
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.clearspring.analytics.stream.cardinality.ICardinalityDefault cardinality estimation method is to use HyperLogLog++.protected IntervalSet<CommitLogPosition>protected doubleprotected EstimatedHistogramprotected EstimatedHistogramprotected StreamingTombstoneHistogramBuilderprotected booleanprotected final MetadataCollector.MinMaxLongTrackerstatic final doubleprotected intprotected final MetadataCollector.MinMaxLongTrackerprotected doubleprotected longprotected longintprotected final MetadataCollector.MinMaxIntTracker -
Constructor Summary
ConstructorsConstructorDescriptionMetadataCollector(Iterable<SSTableReader> sstables, ClusteringComparator comparator) MetadataCollector(ClusteringComparator comparator) MetadataCollector(ClusteringComparator comparator, UUID originatingHostId) -
Method Summary
Modifier and TypeMethodDescriptionaddCellPerPartitionCount(long cellCount) addCompressionRatio(long compressed, long uncompressed) Ratio is compressed/uncompressed and it is if you have 1.x then compression isn't helpingaddKey(ByteBuffer key) addPartitionSizeInBytes(long partitionSize) commitLogIntervals(IntervalSet<CommitLogPosition> commitLogIntervals) static StatsMetadatafinalizeMetadata(String partitioner, double bloomFilterFPChance, long repairedAt, TimeUUID pendingRepair, boolean isTransient, SerializationHeader header, ByteBuffer firstKey, ByteBuffer lastKey) voidrelease()Release large memory objects while keeping metrics intactsstableLevel(int sstableLevel) tokenSpaceCoverage(double coverage) voidupdate(DeletionTime dt) voidupdate(LivenessInfo newInfo) voidvoidupdateClusteringValues(Clustering<?> clustering) voidupdateClusteringValuesByBoundOrBoundary(ClusteringBoundOrBoundary<?> clusteringBoundOrBoundary) voidupdateColumnSetPerRow(long columnSetInRow) voidupdateHasLegacyCounterShards(boolean hasLegacyCounterShards) void
-
Field Details
-
NO_COMPRESSION_RATIO
public static final double NO_COMPRESSION_RATIO- See Also:
-
estimatedPartitionSize
-
estimatedCellPerPartitionCount
-
commitLogIntervals
-
timestampTracker
-
localDeletionTimeTracker
-
ttlTracker
-
compressionRatio
protected double compressionRatio -
estimatedTombstoneDropTime
-
sstableLevel
protected int sstableLevel -
hasLegacyCounterShards
protected boolean hasLegacyCounterShards -
totalColumnsSet
protected long totalColumnsSet -
totalRows
protected long totalRows -
totalTombstones
public int totalTombstones -
tokenSpaceCoverage
protected double tokenSpaceCoverage -
cardinality
protected com.clearspring.analytics.stream.cardinality.ICardinality cardinalityDefault cardinality estimation method is to use HyperLogLog++. Parameter here(p=13, sp=25) should give reasonable estimation while lowering bytes required to hold information. See CASSANDRA-5906 for detail.
-
-
Constructor Details
-
MetadataCollector
-
MetadataCollector
-
MetadataCollector
-
-
Method Details
-
defaultStatsMetadata
-
addKey
-
addPartitionSizeInBytes
-
addCellPerPartitionCount
-
addCellPerPartitionCount
-
addCompressionRatio
Ratio is compressed/uncompressed and it is if you have 1.x then compression isn't helping -
update
- Specified by:
updatein interfacePartitionStatisticsCollector
-
update
- Specified by:
updatein interfacePartitionStatisticsCollector
-
updatePartitionDeletion
- Specified by:
updatePartitionDeletionin interfacePartitionStatisticsCollector
-
update
- Specified by:
updatein interfacePartitionStatisticsCollector
-
updateColumnSetPerRow
public void updateColumnSetPerRow(long columnSetInRow) - Specified by:
updateColumnSetPerRowin interfacePartitionStatisticsCollector
-
commitLogIntervals
-
sstableLevel
-
tokenSpaceCoverage
-
updateClusteringValues
-
updateClusteringValuesByBoundOrBoundary
public void updateClusteringValuesByBoundOrBoundary(ClusteringBoundOrBoundary<?> clusteringBoundOrBoundary) -
updateHasLegacyCounterShards
public void updateHasLegacyCounterShards(boolean hasLegacyCounterShards) - Specified by:
updateHasLegacyCounterShardsin interfacePartitionStatisticsCollector
-
finalizeMetadata
public Map<MetadataType,MetadataComponent> finalizeMetadata(String partitioner, double bloomFilterFPChance, long repairedAt, TimeUUID pendingRepair, boolean isTransient, SerializationHeader header, ByteBuffer firstKey, ByteBuffer lastKey) -
release
public void release()Release large memory objects while keeping metrics intact
-