Class TableMetrics

    • Field Detail

      • EMPTY

        public static final long[] EMPTY
      • GLOBAL_READ_LATENCY

        public static final LatencyMetrics GLOBAL_READ_LATENCY
      • GLOBAL_WRITE_LATENCY

        public static final LatencyMetrics GLOBAL_WRITE_LATENCY
      • GLOBAL_RANGE_LATENCY

        public static final LatencyMetrics GLOBAL_RANGE_LATENCY
      • memtableOnHeapDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> memtableOnHeapDataSize
        Total amount of data stored in the memtable that resides on-heap, including column related overhead and partitions overwritten.
      • memtableOffHeapDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> memtableOffHeapDataSize
        Total amount of data stored in the memtable that resides off-heap, including column related overhead and partitions overwritten.
      • memtableLiveDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> memtableLiveDataSize
        Total amount of live data stored in the memtable, excluding any data structure overhead
      • allMemtablesOnHeapDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> allMemtablesOnHeapDataSize
        Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.
      • allMemtablesOffHeapDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> allMemtablesOffHeapDataSize
        Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.
      • allMemtablesLiveDataSize

        public final com.codahale.metrics.Gauge<java.lang.Long> 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

        public final com.codahale.metrics.Gauge<java.lang.Long> memtableColumnsCount
        Total number of columns present in the memtable.
      • memtableSwitchCount

        public final com.codahale.metrics.Counter memtableSwitchCount
        Number of times flush has resulted in the memtable being switched out.
      • compressionRatio

        public final com.codahale.metrics.Gauge<java.lang.Double> compressionRatio
        Current compression ratio for all SSTables
      • estimatedPartitionSizeHistogram

        public final com.codahale.metrics.Gauge<long[]> estimatedPartitionSizeHistogram
        Histogram of estimated partition size (in bytes).
      • estimatedPartitionCount

        public final com.codahale.metrics.Gauge<java.lang.Long> estimatedPartitionCount
        Approximate number of keys in table.
      • estimatedColumnCountHistogram

        public final com.codahale.metrics.Gauge<long[]> estimatedColumnCountHistogram
        Histogram of estimated number of columns.
      • sstablesPerReadHistogram

        public final TableMetrics.TableHistogram sstablesPerReadHistogram
        Histogram of the number of sstable data files accessed per single partition read
      • sstablesPerRangeReadHistogram

        public final TableMetrics.TableHistogram sstablesPerRangeReadHistogram
        Histogram of the number of sstable data files accessed per partition range read
      • readLatency

        public final LatencyMetrics readLatency
        (Local) read metrics
      • rangeLatency

        public final LatencyMetrics rangeLatency
        (Local) range slice metrics
      • writeLatency

        public final LatencyMetrics writeLatency
        (Local) write metrics
      • pendingFlushes

        public final com.codahale.metrics.Counter pendingFlushes
        Estimated number of tasks pending for this table
      • bytesFlushed

        public final com.codahale.metrics.Counter bytesFlushed
        Total number of bytes flushed since server [re]start
      • flushSizeOnDisk

        public final MovingAverage flushSizeOnDisk
        The average on-disk flushed size for sstables.
      • compactionBytesWritten

        public final com.codahale.metrics.Counter compactionBytesWritten
        Total number of bytes written by compaction since server [re]start
      • pendingCompactions

        public final com.codahale.metrics.Gauge<java.lang.Integer> pendingCompactions
        Estimate of number of pending compactios for this table
      • liveSSTableCount

        public final com.codahale.metrics.Gauge<java.lang.Integer> liveSSTableCount
        Number of SSTables on disk for this CF
      • oldVersionSSTableCount

        public final com.codahale.metrics.Gauge<java.lang.Integer> oldVersionSSTableCount
        Number of SSTables with old version on disk for this CF
      • maxSSTableDuration

        public final com.codahale.metrics.Gauge<java.lang.Long> maxSSTableDuration
        Maximum duration of an SSTable for this table, computed as maxTimestamp - minTimestamp
      • maxSSTableSize

        public final com.codahale.metrics.Gauge<java.lang.Long> 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 liveDiskSpaceUsed
        Disk space used by SSTables belonging to this table
      • uncompressedLiveDiskSpaceUsed

        public final com.codahale.metrics.Counter uncompressedLiveDiskSpaceUsed
        Uncompressed/logical disk space used by SSTables belonging to this table
      • totalDiskSpaceUsed

        public final com.codahale.metrics.Counter totalDiskSpaceUsed
        Total disk space used by SSTables belonging to this table, including obsolete ones waiting to be GC'd
      • minPartitionSize

        public final com.codahale.metrics.Gauge<java.lang.Long> minPartitionSize
        Size of the smallest compacted partition
      • maxPartitionSize

        public final com.codahale.metrics.Gauge<java.lang.Long> maxPartitionSize
        Size of the largest compacted partition
      • meanPartitionSize

        public final com.codahale.metrics.Gauge<java.lang.Long> meanPartitionSize
        Size of the smallest compacted partition
      • compressionMetadataOffHeapMemoryUsed

        public final com.codahale.metrics.Gauge<java.lang.Long> compressionMetadataOffHeapMemoryUsed
        Off heap memory used by compression meta data
      • tombstoneScannedHistogram

        public final TableMetrics.TableHistogram tombstoneScannedHistogram
        Tombstones scanned in queries on this CF
      • colUpdateTimeDeltaHistogram

        public final TableMetrics.TableHistogram colUpdateTimeDeltaHistogram
        Column update time delta on this CF
      • viewLockAcquireTime

        public final TableMetrics.TableTimer viewLockAcquireTime
        time taken acquiring the partition lock for materialized view updates for this table
      • viewReadTime

        public final TableMetrics.TableTimer viewReadTime
        time taken during the local read of a materialized view update
      • trueSnapshotsSize

        public final com.codahale.metrics.Gauge<java.lang.Long> trueSnapshotsSize
        Disk space used by snapshot files which
      • rowCacheHitOutOfRange

        public final com.codahale.metrics.Counter rowCacheHitOutOfRange
        Row cache hits, but result out of range
      • rowCacheHit

        public final com.codahale.metrics.Counter rowCacheHit
        Number of row cache hits
      • rowCacheMiss

        public final com.codahale.metrics.Counter rowCacheMiss
        Number of row cache misses
      • tombstoneFailures

        public final com.codahale.metrics.Counter tombstoneFailures
        Number of tombstone read failures
      • tombstoneWarnings

        public final com.codahale.metrics.Counter tombstoneWarnings
        Number of tombstone read warnings
      • casPrepare

        public final LatencyMetrics casPrepare
        CAS Prepare metrics
      • casPropose

        public final LatencyMetrics casPropose
        CAS Propose metrics
      • percentRepaired

        public final com.codahale.metrics.Gauge<java.lang.Double> percentRepaired
        percent of the data that is repaired
      • bytesRepaired

        public final com.codahale.metrics.Gauge<java.lang.Long> bytesRepaired
        Reports the size of sstables in repaired, unrepaired, and any ongoing repair buckets
      • bytesUnrepaired

        public final com.codahale.metrics.Gauge<java.lang.Long> bytesUnrepaired
      • bytesPendingRepair

        public final com.codahale.metrics.Gauge<java.lang.Long> bytesPendingRepair
      • repairsStarted

        public final com.codahale.metrics.Counter repairsStarted
        Number of started repairs as coordinator on this table
      • repairsCompleted

        public final com.codahale.metrics.Counter repairsCompleted
        Number of completed repairs as coordinator on this table
      • anticompactionTime

        public final TableMetrics.TableTimer anticompactionTime
        time spent anticompacting data before participating in a consistent repair
      • bytesAnticompacted

        public final com.codahale.metrics.Counter bytesAnticompacted
        number of bytes read while doing anticompaction
      • bytesMutatedAnticompaction

        public final com.codahale.metrics.Counter bytesMutatedAnticompaction
        number of bytes where the whole sstable was contained in a repairing range so that we only mutated the repair status
      • mutatedAnticompactionGauge

        public final com.codahale.metrics.Gauge<java.lang.Double> mutatedAnticompactionGauge
        ratio of how much we anticompact vs how much we could mutate the repair status
      • coordinatorScanLatency

        public final com.codahale.metrics.Timer coordinatorScanLatency
      • 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

        public final com.codahale.metrics.Gauge<java.lang.Long> speculativeSampleLatencyNanos
      • additionalWrites

        public final com.codahale.metrics.Counter additionalWrites
      • additionalWriteLatencyNanos

        public final com.codahale.metrics.Gauge<java.lang.Long> additionalWriteLatencyNanos
      • unleveledSSTables

        public final com.codahale.metrics.Gauge<java.lang.Integer> unleveledSSTables
      • confirmedRepairedInconsistencies

        public final TableMetrics.TableMeter confirmedRepairedInconsistencies
        Metrics for inconsistencies detected between repaired data sets across replicas. These are tracked on the coordinator.
      • topReadPartitionFrequency

        public final Sampler<java.nio.ByteBuffer> topReadPartitionFrequency
        When sampler activated, will track the most frequently read partitions
      • topWritePartitionFrequency

        public final Sampler<java.nio.ByteBuffer> topWritePartitionFrequency
        When sampler activated, will track the most frequently written to partitions
      • topWritePartitionSize

        public final Sampler<java.nio.ByteBuffer> topWritePartitionSize
        When sampler activated, will track the largest mutations
      • topCasPartitionContention

        public final Sampler<java.nio.ByteBuffer> topCasPartitionContention
        When sampler activated, will track the most frequent partitions with cas contention
      • topLocalReadQueryTime

        public final Sampler<java.lang.String> topLocalReadQueryTime
        When sampler activated, will track the slowest local reads
      • topReadPartitionRowCount

        public final Sampler<java.nio.ByteBuffer> topReadPartitionRowCount
        When sampler activated, will track partitions read with the most rows
      • topReadPartitionTombstoneCount

        public final Sampler<java.nio.ByteBuffer> topReadPartitionTombstoneCount
        When sampler activated, will track partitions read with the most tombstones
      • topReadPartitionSSTableCount

        public final Sampler<java.nio.ByteBuffer> topReadPartitionSSTableCount
        When sample activated, will track partitions read with the most merged sstables
      • formatSpecificGauges

        public final com.google.common.collect.ImmutableMap<SSTableFormat<?,​?>,​com.google.common.collect.ImmutableMap<java.lang.String,​com.codahale.metrics.Gauge<? extends java.lang.Number>>> formatSpecificGauges
      • globalPercentRepaired

        public static final com.codahale.metrics.Gauge<java.lang.Double> globalPercentRepaired
      • globalBytesRepaired

        public static final com.codahale.metrics.Gauge<java.lang.Long> globalBytesRepaired
      • globalBytesUnrepaired

        public static final com.codahale.metrics.Gauge<java.lang.Long> globalBytesUnrepaired
      • globalBytesPendingRepair

        public static final com.codahale.metrics.Gauge<java.lang.Long> 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 rfpRowsCachedPerQuery
        This histogram records the maximum number of rows ReplicaFilteringProtection caches 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.
    • Method Detail

      • 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 java.lang.Number> com.codahale.metrics.Gauge<T> createTableGauge​(java.lang.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​(java.lang.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

        protected <G,​T> com.codahale.metrics.Gauge<T> createTableGauge​(java.lang.String name,
                                                                             java.lang.String alias,
                                                                             com.codahale.metrics.Gauge<T> gauge,
                                                                             com.codahale.metrics.Gauge<G> globalGauge)
      • createTableGaugeWithDeprecation

        protected <G,​T> com.codahale.metrics.Gauge<T> createTableGaugeWithDeprecation​(java.lang.String name,
                                                                                            java.lang.String deprecated,
                                                                                            com.codahale.metrics.Gauge<T> gauge,
                                                                                            com.codahale.metrics.Gauge<G> globalGauge)
        Same as createTableGauge(String, Gauge, Gauge) but accepts a deprecated name for a table Gauge. Prefer that method when deprecation is not necessary.
        Parameters:
        name - the name of the metric registered with the "Table" type
        deprecated - the deprecated name for the metric registered with the "Table" type
      • createTableCounter

        protected com.codahale.metrics.Counter createTableCounter​(java.lang.String name)
        Creates a counter that will also have a global counter thats the sum of all counters across different column families
      • createTableCounter

        protected com.codahale.metrics.Counter createTableCounter​(java.lang.String name,
                                                                  java.lang.String alias)
      • createTableHistogram

        protected TableMetrics.TableHistogram createTableHistogram​(java.lang.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​(java.lang.String name,
                                                                   java.lang.String alias,
                                                                   com.codahale.metrics.Histogram keyspaceHistogram,
                                                                   boolean considerZeroes)
      • createTableHistogram

        protected com.codahale.metrics.Histogram createTableHistogram​(java.lang.String name,
                                                                      boolean considerZeroes)
      • createTableHistogram

        protected com.codahale.metrics.Histogram createTableHistogram​(java.lang.String name,
                                                                      java.lang.String alias,
                                                                      boolean considerZeroes)
      • createTableTimer

        protected TableMetrics.TableTimer createTableTimer​(java.lang.String name,
                                                           com.codahale.metrics.Timer keyspaceTimer)
      • createTableTimer

        protected SnapshottingTimer createTableTimer​(java.lang.String name)
      • createTableMeter

        protected TableMetrics.TableMeter createTableMeter​(java.lang.String name,
                                                           com.codahale.metrics.Meter keyspaceMeter)
      • createTableMeter

        protected TableMetrics.TableMeter createTableMeter​(java.lang.String name,
                                                           java.lang.String alias,
                                                           com.codahale.metrics.Meter keyspaceMeter)