Package org.apache.cassandra.metrics
Class TableMetrics
java.lang.Object
org.apache.cassandra.metrics.TableMetrics
Metrics for
ColumnFamilyStore.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.codahale.metrics.Gauge<Long>final com.codahale.metrics.Counterfinal com.codahale.metrics.Gauge<Long>Total amount of live data stored in the memtables (2i and pending flush memtables included) that resides off-heap, excluding any data structure overheadfinal com.codahale.metrics.Gauge<Long>Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.final com.codahale.metrics.Gauge<Long>Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.final TableMetrics.TableTimertime spent anticompacting data before participating in a consistent repairfinal TableMetrics.TableMeternumber of bytes read while doing anticompactionfinal com.codahale.metrics.CounterTotal number of bytes flushed since server [re]startfinal TableMetrics.TableMeternumber of bytes where the whole sstable was contained in a repairing range so that we only mutated the repair statusfinal com.codahale.metrics.Gauge<Long>final TableMetrics.TableMeternumber of bytes that were scanned during preview repairfinal TableMetrics.TableMeternumber of desynchronized bytes that were detected during preview repairfinal com.codahale.metrics.Gauge<Long>Reports the size of sstables in repaired, unrepaired, and any ongoing repair bucketsfinal com.codahale.metrics.Gauge<Long>approximate number of bytes read while creating merkle treesfinal LatencyMetricsCAS Commit metricsfinal LatencyMetricsCAS Prepare metricsfinal LatencyMetricsCAS Propose metricsfinal TableMetrics.TableMeterfinal TableMetrics.TableMeterColumn update time delta on this CFfinal com.codahale.metrics.CounterTotal number of bytes written by compaction since server [re]startfinal com.codahale.metrics.Gauge<Long>Off heap memory used by compression meta datafinal com.codahale.metrics.Gauge<Double>Current compression ratio for all SSTablesfinal TableMetrics.TableMeterMetrics for inconsistencies detected between repaired data sets across replicas.final SnapshottingTimerfinal TableMetrics.TableMeterfinal TableMetrics.TableMeterfinal com.codahale.metrics.Timerfinal SnapshottingTimerstatic final long[]final com.codahale.metrics.Gauge<long[]>Histogram of estimated number of columns.final com.codahale.metrics.Gauge<Long>Approximate number of keys in table.final com.codahale.metrics.Gauge<long[]>Histogram of estimated partition size (in bytes).final MovingAverageThe average on-disk flushed size for sstables.final com.google.common.collect.ImmutableMap<SSTableFormat<?,?>, com.google.common.collect.ImmutableMap<String, com.codahale.metrics.Gauge<? extends Number>>> static final LatencyMetricsstatic final LatencyMetricsstatic final LatencyMetricsstatic final com.codahale.metrics.Gauge<Long>static final com.codahale.metrics.Gauge<Long>static final com.codahale.metrics.Gauge<Long>static final com.codahale.metrics.Gauge<Double>final com.codahale.metrics.CounterDisk space used by SSTables belonging to this tableLive rows scanned in queries on this CFfinal com.codahale.metrics.Gauge<Integer>Number of SSTables on disk for this CFfinal TableMetrics.TableMeterfinal TableMetrics.TableMeterfinal com.codahale.metrics.Gauge<Long>Size of the largest compacted partitionfinal com.codahale.metrics.Gauge<Long>Maximum duration of an SSTable for this table, computed as maxTimestamp - minTimestampfinal com.codahale.metrics.Gauge<Long>Maximum size of SSTable of this table - the physical size on disk of all components for such SSTable in bytesfinal com.codahale.metrics.Gauge<Long>Size of the smallest compacted partitionfinal com.codahale.metrics.Gauge<Long>Total number of columns present in the memtable.final com.codahale.metrics.Gauge<Long>Total amount of live data stored in the memtable, excluding any data structure overheadfinal com.codahale.metrics.Gauge<Long>Total amount of data stored in the memtable that resides off-heap, including column related overhead and partitions overwritten.final com.codahale.metrics.Gauge<Long>Total amount of data stored in the memtable that resides on-heap, including column related overhead and partitions overwritten.final com.codahale.metrics.CounterNumber of times flush has resulted in the memtable being switched out.final com.codahale.metrics.Gauge<Long>Size of the smallest compacted partitionfinal com.codahale.metrics.Gauge<Double>ratio of how much we anticompact vs how much we could mutate the repair statusfinal com.codahale.metrics.Gauge<Integer>Number of SSTables with old version on disk for this CFnumber of partitions read creating merkle treesfinal com.codahale.metrics.Gauge<Integer>Estimate of number of pending compactios for this tablefinal com.codahale.metrics.CounterEstimated number of tasks pending for this tablefinal com.codahale.metrics.Gauge<Double>percent of the data that is repairedfinal LatencyMetrics(Local) range slice metricsfinal LatencyMetrics(Local) read metricsfinal com.codahale.metrics.Meterfinal TableMetrics.TableTimerfinal com.codahale.metrics.CounterNumber of completed repairs as coordinator on this tablefinal com.codahale.metrics.CounterNumber of started repairs as coordinator on this tablefinal TableMetrics.TableTimertime spent syncing data in a repairfinal com.codahale.metrics.Meterfinal com.codahale.metrics.HistogramThis histogram records the maximum number of rowsReplicaFilteringProtectioncaches at a point in time per query.final com.codahale.metrics.CounterNumber of row cache hitsfinal com.codahale.metrics.CounterRow cache hits, but result out of rangefinal com.codahale.metrics.CounterNumber of row cache missesfinal TableMetrics.TableMeterfinal TableMetrics.TableMeterfinal EnumMap<Sampler.SamplerType,Sampler<?>> final com.codahale.metrics.Meterfinal com.codahale.metrics.Counterfinal com.codahale.metrics.Counterfinal com.codahale.metrics.Counterfinal com.codahale.metrics.Gauge<Long>Histogram of the number of sstable data files accessed per partition range readHistogram of the number of sstable data files accessed per single partition readfinal TableMetrics.TableMeternumber of desynchronized token ranges that were detected during preview repairfinal com.codahale.metrics.CounterNumber of tombstone read failuresTombstones scanned in queries on this CFfinal com.codahale.metrics.CounterNumber of tombstone read warningsfinal TableMetrics.TableMeterfinal TableMetrics.TableMeterfinal Sampler<ByteBuffer>When sampler activated, will track the most frequent partitions with cas contentionWhen sampler activated, will track the slowest local readsfinal Sampler<ByteBuffer>When sampler activated, will track the most frequently read partitionsfinal Sampler<ByteBuffer>When sampler activated, will track partitions read with the most rowsfinal Sampler<ByteBuffer>When sample activated, will track partitions read with the most merged sstablesfinal Sampler<ByteBuffer>When sampler activated, will track partitions read with the most tombstonesfinal Sampler<ByteBuffer>When sampler activated, will track the most frequently written to partitionsfinal Sampler<ByteBuffer>When sampler activated, will track the largest mutationsfinal com.codahale.metrics.CounterTotal disk space used by SSTables belonging to this table, including obsolete ones waiting to be GC'dfinal com.codahale.metrics.Gauge<Long>Disk space used by snapshot files whichfinal com.codahale.metrics.CounterUncompressed/logical disk space used by SSTables belonging to this tablefinal TableMetrics.TableMeterfinal com.codahale.metrics.Gauge<Integer>final TableMetrics.TableTimertime spent creating merkle treesfinal TableMetrics.TableTimertime taken acquiring the partition lock for materialized view updates for this tablefinal TableMetrics.TableTimertime taken during the local read of a materialized view updatefinal LatencyMetrics(Local) write metrics -
Constructor Summary
ConstructorsConstructorDescriptionTableMetrics(ColumnFamilyStore cfs, TableMetrics.ReleasableMetric memtableMetrics) Creates metrics for givenColumnFamilyStore. -
Method Summary
Modifier and TypeMethodDescriptionstatic long[]addHistogram(long[] sums, long[] buckets) protected com.codahale.metrics.CountercreateTableCounter(String name) Creates a counter that will also have a global counter thats the sum of all counters across different column familiesprotected com.codahale.metrics.CountercreateTableCounter(String name, String alias) protected <T extends Number>
com.codahale.metrics.Gauge<T>createTableGauge(String name, com.codahale.metrics.Gauge<T> gauge) Create a gauge that will be part of a merged version of all column families.protected <G,T> com.codahale.metrics.Gauge<T> createTableGauge(String name, com.codahale.metrics.Gauge<T> gauge, com.codahale.metrics.Gauge<G> globalGauge) Create a gauge that will be part of a merged version of all column families.protected <G,T> com.codahale.metrics.Gauge<T> createTableGauge(String name, String alias, com.codahale.metrics.Gauge<T> gauge, com.codahale.metrics.Gauge<G> globalGauge) protected <G,T> com.codahale.metrics.Gauge<T> createTableGaugeWithDeprecation(String name, String deprecated, com.codahale.metrics.Gauge<T> gauge, com.codahale.metrics.Gauge<G> globalGauge) Same ascreateTableGauge(String, Gauge, Gauge)but accepts a deprecated name for a tableGauge.protected com.codahale.metrics.HistogramcreateTableHistogram(String name, boolean considerZeroes) protected TableMetrics.TableHistogramcreateTableHistogram(String name, com.codahale.metrics.Histogram keyspaceHistogram, boolean considerZeroes) Create a histogram-like interface that will register both a CF, keyspace and global level histogram and forward any updates to bothprotected com.codahale.metrics.HistogramcreateTableHistogram(String name, String alias, boolean considerZeroes) protected TableMetrics.TableHistogramcreateTableHistogram(String name, String alias, com.codahale.metrics.Histogram keyspaceHistogram, boolean considerZeroes) protected TableMetrics.TableMetercreateTableMeter(String name, com.codahale.metrics.Meter keyspaceMeter) protected TableMetrics.TableMetercreateTableMeter(String name, com.codahale.metrics.Meter keyspaceMeter, boolean globalMeterGaugeCompatible) protected TableMetrics.TableMetercreateTableMeter(String name, String alias, com.codahale.metrics.Meter keyspaceMeter, boolean globalMeterGaugeCompatible) protected SnapshottingTimercreateTableTimer(String name) protected TableMetrics.TableTimercreateTableTimer(String name, com.codahale.metrics.Timer keyspaceTimer) voidrelease()Release all associated metrics.voidupdateSSTableIterated(int count) voidupdateSSTableIteratedInRangeRead(int count)
-
Field Details
-
EMPTY
public static final long[] EMPTY -
GLOBAL_READ_LATENCY
-
GLOBAL_WRITE_LATENCY
-
GLOBAL_RANGE_LATENCY
-
memtableOnHeapDataSize
Total amount of data stored in the memtable that resides on-heap, including column related overhead and partitions overwritten. -
memtableOffHeapDataSize
Total amount of data stored in the memtable that resides off-heap, including column related overhead and partitions overwritten. -
memtableLiveDataSize
Total amount of live data stored in the memtable, excluding any data structure overhead -
allMemtablesOnHeapDataSize
Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap. -
allMemtablesOffHeapDataSize
Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap. -
allMemtablesLiveDataSize
Total amount of live data stored in the memtables (2i and pending flush memtables included) that resides off-heap, excluding any data structure overhead -
memtableColumnsCount
Total number of columns present in the memtable. -
memtableSwitchCount
public final com.codahale.metrics.Counter memtableSwitchCountNumber of times flush has resulted in the memtable being switched out. -
compressionRatio
Current compression ratio for all SSTables -
estimatedPartitionSizeHistogram
public final com.codahale.metrics.Gauge<long[]> estimatedPartitionSizeHistogramHistogram of estimated partition size (in bytes). -
estimatedPartitionCount
Approximate number of keys in table. -
estimatedColumnCountHistogram
public final com.codahale.metrics.Gauge<long[]> estimatedColumnCountHistogramHistogram of estimated number of columns. -
sstablesPerReadHistogram
Histogram of the number of sstable data files accessed per single partition read -
sstablesPerRangeReadHistogram
Histogram of the number of sstable data files accessed per partition range read -
readLatency
(Local) read metrics -
rangeLatency
(Local) range slice metrics -
writeLatency
(Local) write metrics -
pendingFlushes
public final com.codahale.metrics.Counter pendingFlushesEstimated number of tasks pending for this table -
bytesFlushed
public final com.codahale.metrics.Counter bytesFlushedTotal number of bytes flushed since server [re]start -
flushSizeOnDisk
The average on-disk flushed size for sstables. -
compactionBytesWritten
public final com.codahale.metrics.Counter compactionBytesWrittenTotal number of bytes written by compaction since server [re]start -
pendingCompactions
Estimate of number of pending compactios for this table -
liveSSTableCount
Number of SSTables on disk for this CF -
oldVersionSSTableCount
Number of SSTables with old version on disk for this CF -
maxSSTableDuration
Maximum duration of an SSTable for this table, computed as maxTimestamp - minTimestamp -
maxSSTableSize
Maximum size of SSTable of this table - the physical size on disk of all components for such SSTable in bytes -
liveDiskSpaceUsed
public final com.codahale.metrics.Counter liveDiskSpaceUsedDisk space used by SSTables belonging to this table -
uncompressedLiveDiskSpaceUsed
public final com.codahale.metrics.Counter uncompressedLiveDiskSpaceUsedUncompressed/logical disk space used by SSTables belonging to this table -
totalDiskSpaceUsed
public final com.codahale.metrics.Counter totalDiskSpaceUsedTotal disk space used by SSTables belonging to this table, including obsolete ones waiting to be GC'd -
minPartitionSize
Size of the smallest compacted partition -
maxPartitionSize
Size of the largest compacted partition -
meanPartitionSize
Size of the smallest compacted partition -
compressionMetadataOffHeapMemoryUsed
Off heap memory used by compression meta data -
tombstoneScannedHistogram
Tombstones scanned in queries on this CF -
liveScannedHistogram
Live rows scanned in queries on this CF -
colUpdateTimeDeltaHistogram
Column update time delta on this CF -
viewLockAcquireTime
time taken acquiring the partition lock for materialized view updates for this table -
viewReadTime
time taken during the local read of a materialized view update -
trueSnapshotsSize
Disk space used by snapshot files which -
rowCacheHitOutOfRange
public final com.codahale.metrics.Counter rowCacheHitOutOfRangeRow cache hits, but result out of range -
rowCacheHit
public final com.codahale.metrics.Counter rowCacheHitNumber of row cache hits -
rowCacheMiss
public final com.codahale.metrics.Counter rowCacheMissNumber of row cache misses -
tombstoneFailures
public final com.codahale.metrics.Counter tombstoneFailuresNumber of tombstone read failures -
tombstoneWarnings
public final com.codahale.metrics.Counter tombstoneWarningsNumber of tombstone read warnings -
casPrepare
CAS Prepare metrics -
casPropose
CAS Propose metrics -
casCommit
CAS Commit metrics -
percentRepaired
percent of the data that is repaired -
bytesRepaired
Reports the size of sstables in repaired, unrepaired, and any ongoing repair buckets -
bytesUnrepaired
-
bytesPendingRepair
-
repairsStarted
public final com.codahale.metrics.Counter repairsStartedNumber of started repairs as coordinator on this table -
repairsCompleted
public final com.codahale.metrics.Counter repairsCompletedNumber of completed repairs as coordinator on this table -
anticompactionTime
time spent anticompacting data before participating in a consistent repair -
validationTime
time spent creating merkle trees -
repairSyncTime
time spent syncing data in a repair -
bytesValidated
approximate number of bytes read while creating merkle trees -
partitionsValidated
number of partitions read creating merkle trees -
bytesAnticompacted
number of bytes read while doing anticompaction -
bytesMutatedAnticompaction
number of bytes where the whole sstable was contained in a repairing range so that we only mutated the repair status -
bytesPreviewed
number of bytes that were scanned during preview repair -
tokenRangesPreviewedDesynchronized
number of desynchronized token ranges that were detected during preview repair -
bytesPreviewedDesynchronized
number of desynchronized bytes that were detected during preview repair -
mutatedAnticompactionGauge
ratio of how much we anticompact vs how much we could mutate the repair status -
coordinatorReadLatency
-
coordinatorScanLatency
public final com.codahale.metrics.Timer coordinatorScanLatency -
coordinatorWriteLatency
-
speculativeRetries
public final com.codahale.metrics.Counter speculativeRetries -
speculativeFailedRetries
public final com.codahale.metrics.Counter speculativeFailedRetries -
speculativeInsufficientReplicas
public final com.codahale.metrics.Counter speculativeInsufficientReplicas -
speculativeSampleLatencyNanos
-
additionalWrites
public final com.codahale.metrics.Counter additionalWrites -
additionalWriteLatencyNanos
-
unleveledSSTables
-
confirmedRepairedInconsistencies
Metrics for inconsistencies detected between repaired data sets across replicas. These are tracked on the coordinator. -
unconfirmedRepairedInconsistencies
-
repairedDataTrackingOverreadRows
-
repairedDataTrackingOverreadTime
-
topReadPartitionFrequency
When sampler activated, will track the most frequently read partitions -
topWritePartitionFrequency
When sampler activated, will track the most frequently written to partitions -
topWritePartitionSize
When sampler activated, will track the largest mutations -
topCasPartitionContention
When sampler activated, will track the most frequent partitions with cas contention -
topLocalReadQueryTime
When sampler activated, will track the slowest local reads -
topReadPartitionRowCount
When sampler activated, will track partitions read with the most rows -
topReadPartitionTombstoneCount
When sampler activated, will track partitions read with the most tombstones -
topReadPartitionSSTableCount
When sample activated, will track partitions read with the most merged sstables -
clientTombstoneWarnings
-
clientTombstoneAborts
-
coordinatorReadSizeWarnings
-
coordinatorReadSizeAborts
-
coordinatorReadSize
-
localReadSizeWarnings
-
localReadSizeAborts
-
localReadSize
-
rowIndexSizeWarnings
-
rowIndexSizeAborts
-
rowIndexSize
-
tooManySSTableIndexesReadWarnings
-
tooManySSTableIndexesReadAborts
-
formatSpecificGauges
public final com.google.common.collect.ImmutableMap<SSTableFormat<?,?>, formatSpecificGaugescom.google.common.collect.ImmutableMap<String, com.codahale.metrics.Gauge<? extends Number>>> -
globalPercentRepaired
-
globalBytesRepaired
-
globalBytesUnrepaired
-
globalBytesPendingRepair
-
readRepairRequests
public final com.codahale.metrics.Meter readRepairRequests -
shortReadProtectionRequests
public final com.codahale.metrics.Meter shortReadProtectionRequests -
replicaFilteringProtectionRequests
public final com.codahale.metrics.Meter replicaFilteringProtectionRequests -
rfpRowsCachedPerQuery
public final com.codahale.metrics.Histogram rfpRowsCachedPerQueryThis histogram records the maximum number of rowsReplicaFilteringProtectioncaches at a point in time per query. With no replica divergence, this is equivalent to the maximum number of cached rows in a single partition during a query. It can be helpful when choosing appropriate values for the replica_filtering_protection thresholds in cassandra.yaml. -
samplers
-
-
Constructor Details
-
TableMetrics
Creates metrics for givenColumnFamilyStore.- Parameters:
cfs- ColumnFamilyStore to measure metrics
-
-
Method Details
-
addHistogram
public static long[] addHistogram(long[] sums, long[] buckets) -
updateSSTableIterated
public void updateSSTableIterated(int count) -
updateSSTableIteratedInRangeRead
public void updateSSTableIteratedInRangeRead(int count) -
release
public void release()Release all associated metrics. -
createTableGauge
protected <T extends Number> com.codahale.metrics.Gauge<T> createTableGauge(String name, com.codahale.metrics.Gauge<T> gauge) Create a gauge that will be part of a merged version of all column families. The global gauge will merge each CF gauge by adding their values -
createTableGauge
protected <G,T> com.codahale.metrics.Gauge<T> createTableGauge(String name, com.codahale.metrics.Gauge<T> gauge, com.codahale.metrics.Gauge<G> globalGauge) Create a gauge that will be part of a merged version of all column families. The global gauge is defined as the globalGauge parameter -
createTableGauge
-
createTableGaugeWithDeprecation
protected <G,T> com.codahale.metrics.Gauge<T> createTableGaugeWithDeprecation(String name, String deprecated, com.codahale.metrics.Gauge<T> gauge, com.codahale.metrics.Gauge<G> globalGauge) Same ascreateTableGauge(String, Gauge, Gauge)but accepts a deprecated name for a tableGauge. Prefer that method when deprecation is not necessary.- Parameters:
name- the name of the metric registered with the "Table" typedeprecated- the deprecated name for the metric registered with the "Table" type
-
createTableCounter
Creates a counter that will also have a global counter thats the sum of all counters across different column families -
createTableCounter
-
createTableHistogram
protected TableMetrics.TableHistogram createTableHistogram(String name, com.codahale.metrics.Histogram keyspaceHistogram, boolean considerZeroes) Create a histogram-like interface that will register both a CF, keyspace and global level histogram and forward any updates to both -
createTableHistogram
protected TableMetrics.TableHistogram createTableHistogram(String name, String alias, com.codahale.metrics.Histogram keyspaceHistogram, boolean considerZeroes) -
createTableHistogram
-
createTableHistogram
-
createTableTimer
protected TableMetrics.TableTimer createTableTimer(String name, com.codahale.metrics.Timer keyspaceTimer) -
createTableTimer
-
createTableMeter
protected TableMetrics.TableMeter createTableMeter(String name, com.codahale.metrics.Meter keyspaceMeter) -
createTableMeter
protected TableMetrics.TableMeter createTableMeter(String name, com.codahale.metrics.Meter keyspaceMeter, boolean globalMeterGaugeCompatible) -
createTableMeter
protected TableMetrics.TableMeter createTableMeter(String name, String alias, com.codahale.metrics.Meter keyspaceMeter, boolean globalMeterGaugeCompatible)
-