Class TableMetrics

java.lang.Object
org.apache.cassandra.metrics.TableMetrics

public class TableMetrics extends Object
Metrics for ColumnFamilyStore.
  • Field Details

    • 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<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<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<Long> memtableLiveDataSize
      Total amount of live data stored in the memtable, excluding any data structure overhead
    • allMemtablesOnHeapDataSize

      public final com.codahale.metrics.Gauge<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<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<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<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<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<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<Integer> pendingCompactions
      Estimate of number of pending compactios for this table
    • liveSSTableCount

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

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

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

      public final com.codahale.metrics.Gauge<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<Long> minPartitionSize
      Size of the smallest compacted partition
    • maxPartitionSize

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

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

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

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

      public final TableMetrics.TableHistogram liveScannedHistogram
      Live rows 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<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
    • casCommit

      public final LatencyMetrics casCommit
      CAS Commit metrics
    • percentRepaired

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

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

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

      public final com.codahale.metrics.Gauge<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
    • validationTime

      public final TableMetrics.TableTimer validationTime
      time spent creating merkle trees
    • repairSyncTime

      public final TableMetrics.TableTimer repairSyncTime
      time spent syncing data in a repair
    • bytesValidated

      public final TableMetrics.TableHistogram bytesValidated
      approximate number of bytes read while creating merkle trees
    • partitionsValidated

      public final TableMetrics.TableHistogram partitionsValidated
      number of partitions read creating merkle trees
    • bytesAnticompacted

      public final TableMetrics.TableMeter bytesAnticompacted
      number of bytes read while doing anticompaction
    • bytesMutatedAnticompaction

      public final TableMetrics.TableMeter bytesMutatedAnticompaction
      number of bytes where the whole sstable was contained in a repairing range so that we only mutated the repair status
    • bytesPreviewed

      public final TableMetrics.TableMeter bytesPreviewed
      number of bytes that were scanned during preview repair
    • tokenRangesPreviewedDesynchronized

      public final TableMetrics.TableMeter tokenRangesPreviewedDesynchronized
      number of desynchronized token ranges that were detected during preview repair
    • bytesPreviewedDesynchronized

      public final TableMetrics.TableMeter bytesPreviewedDesynchronized
      number of desynchronized bytes that were detected during preview repair
    • mutatedAnticompactionGauge

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

      public final SnapshottingTimer coordinatorReadLatency
    • coordinatorScanLatency

      public final com.codahale.metrics.Timer coordinatorScanLatency
    • coordinatorWriteLatency

      public final SnapshottingTimer 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

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

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

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

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

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

      public final TableMetrics.TableMeter unconfirmedRepairedInconsistencies
    • repairedDataTrackingOverreadRows

      public final TableMetrics.TableHistogram repairedDataTrackingOverreadRows
    • repairedDataTrackingOverreadTime

      public final TableMetrics.TableTimer repairedDataTrackingOverreadTime
    • topReadPartitionFrequency

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

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

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

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

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

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

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

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

      public final TableMetrics.TableMeter clientTombstoneWarnings
    • clientTombstoneAborts

      public final TableMetrics.TableMeter clientTombstoneAborts
    • coordinatorReadSizeWarnings

      public final TableMetrics.TableMeter coordinatorReadSizeWarnings
    • coordinatorReadSizeAborts

      public final TableMetrics.TableMeter coordinatorReadSizeAborts
    • coordinatorReadSize

      public final TableMetrics.TableHistogram coordinatorReadSize
    • localReadSizeWarnings

      public final TableMetrics.TableMeter localReadSizeWarnings
    • localReadSizeAborts

      public final TableMetrics.TableMeter localReadSizeAborts
    • localReadSize

      public final TableMetrics.TableHistogram localReadSize
    • rowIndexSizeWarnings

      public final TableMetrics.TableMeter rowIndexSizeWarnings
    • rowIndexSizeAborts

      public final TableMetrics.TableMeter rowIndexSizeAborts
    • rowIndexSize

      public final TableMetrics.TableHistogram rowIndexSize
    • tooManySSTableIndexesReadWarnings

      public final TableMetrics.TableMeter tooManySSTableIndexesReadWarnings
    • tooManySSTableIndexesReadAborts

      public final TableMetrics.TableMeter tooManySSTableIndexesReadAborts
    • formatSpecificGauges

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

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

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

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

      public static final com.codahale.metrics.Gauge<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.
    • samplers

      public final EnumMap<Sampler.SamplerType,Sampler<?>> samplers
  • Constructor Details

  • 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

      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)
    • 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 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(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(String name, String alias)
    • 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

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

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

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

      protected SnapshottingTimer createTableTimer(String name)
    • 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)