ColumnFamilyMetrics (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.metrics

## Class ColumnFamilyMetrics

- java.lang.Object
- - org.apache.cassandra.metrics.ColumnFamilyMetrics

-     public class ColumnFamilyMetrics
      extends java.lang.Object

  Metrics for `ColumnFamilyStore`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ColumnFamilyMetrics.ColumnFamilyHistogram`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.Set<java.lang.String>` | `all` Stores all metric names created that can be used when unregistering
    `static java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<com.yammer.metrics.core.Metric>>` | `allColumnFamilyMetrics` stores metrics that will be rolled into a single global metric
    `com.yammer.metrics.core.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
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `allMemtablesOffHeapSize` Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `allMemtablesOnHeapSize` Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `bloomFilterDiskSpaceUsed` Disk space used by bloom filter
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `bloomFilterFalsePositives` Number of false positives in bloom filter
    `com.yammer.metrics.core.Gauge<java.lang.Double>` | `bloomFilterFalseRatio` False positive ratio of bloom filter
    `LatencyMetrics` | `casCommit` CAS Commit metrics
    `LatencyMetrics` | `casPrepare` CAS Prepare metrics
    `LatencyMetrics` | `casPropose` CAS Propose metrics
    `com.yammer.metrics.core.Gauge<java.lang.Double>` | `compressionRatio` Current compression ratio for all SSTables
    `com.yammer.metrics.core.Timer` | `coordinatorReadLatency`
    `com.yammer.metrics.core.Timer` | `coordinatorScanLatency`
    `com.yammer.metrics.core.Gauge<long[]>` | `estimatedColumnCountHistogram` Histogram of estimated number of columns.
    `com.yammer.metrics.core.Gauge<long[]>` | `estimatedRowSizeHistogram` Histogram of estimated row size (in bytes).
    `static LatencyMetrics` | `globalRangeLatency`
    `static LatencyMetrics` | `globalReadLatency`
    `static LatencyMetrics` | `globalWriteLatency`
    `com.yammer.metrics.core.Gauge<java.lang.Double>` | `keyCacheHitRate` Key cache hit rate for this CF
    `com.yammer.metrics.core.Counter` | `liveDiskSpaceUsed` Disk space used by SSTables belonging to this CF
    `ColumnFamilyMetrics.ColumnFamilyHistogram` | `liveScannedHistogram` Live cells scanned in queries on this CF
    `com.yammer.metrics.core.Gauge<java.lang.Integer>` | `liveSSTableCount` Number of SSTables on disk for this CF
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `maxRowSize` Size of the largest compacted row
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `meanRowSize` Size of the smallest compacted row
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `memtableColumnsCount` Total number of columns present in the memtable.
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `memtableLiveDataSize` Total amount of live data stored in the memtable, excluding any data structure overhead
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `memtableOffHeapSize` Total amount of data stored in the memtable that resides off-heap, including column related overhead and overwritten rows.
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `memtableOnHeapSize` Total amount of data stored in the memtable that resides on-heap, including column related overhead and overwritten rows.
    `com.yammer.metrics.core.Counter` | `memtableSwitchCount` Number of times flush has resulted in the memtable being switched out.
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `minRowSize` Size of the smallest compacted row
    `com.yammer.metrics.core.Gauge<java.lang.Integer>` | `pendingCompactions` Estimate of number of pending compactios for this CF
    `com.yammer.metrics.core.Counter` | `pendingFlushes` Estimated number of tasks pending for this column family
    `LatencyMetrics` | `rangeLatency` (Local) range slice metrics
    `LatencyMetrics` | `readLatency` (Local) read metrics
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `recentBloomFilterFalsePositives` Number of false positives in bloom filter from last read
    `com.yammer.metrics.core.Gauge<java.lang.Double>` | `recentBloomFilterFalseRatio` False positive ratio of bloom filter from last read
    `EstimatedHistogram` | `recentSSTablesPerRead` Deprecated.
    `com.yammer.metrics.core.Counter` | `rowCacheHit` Number of row cache hits
    `com.yammer.metrics.core.Counter` | `rowCacheHitOutOfRange` Row cache hits, but result out of range
    `com.yammer.metrics.core.Counter` | `rowCacheMiss` Number of row cache misses
    `com.yammer.metrics.core.Counter` | `speculativeRetries`
    `EstimatedHistogram` | `sstablesPerRead` Deprecated.
    `ColumnFamilyMetrics.ColumnFamilyHistogram` | `sstablesPerReadHistogram` Histogram of the number of sstable data files accessed per read
    `ColumnFamilyMetrics.ColumnFamilyHistogram` | `tombstoneScannedHistogram` Tombstones scanned in queries on this CF
    `com.yammer.metrics.core.Counter` | `totalDiskSpaceUsed` Total disk space used by SSTables belonging to this CF, including obsolete ones waiting to be GC'd
    `com.yammer.metrics.core.Gauge<java.lang.Long>` | `trueSnapshotsSize` Disk space used by snapshot files which
    `com.yammer.metrics.core.Timer` | `waitingOnFreeMemtableSpace` Time spent waiting for free memtable space, either on- or off-heap
    `LatencyMetrics` | `writeLatency` (Local) write metrics

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnFamilyMetrics(ColumnFamilyStore cfs)` Creates metrics for given `ColumnFamilyStore`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected com.yammer.metrics.core.Counter` | `createColumnFamilyCounter(java.lang.String name)` Creates a counter that will also have a global counter thats the sum of all counters across different column families
    `protected <T extends java.lang.Number> com.yammer.metrics.core.Gauge<T>` | `createColumnFamilyGauge(java.lang.String name, com.yammer.metrics.core.Gauge<T> gauge)` Create a gauge that will be part of a merged version of all column families.
    `protected <G,T> com.yammer.metrics.core.Gauge<T>` | `createColumnFamilyGauge(java.lang.String name, com.yammer.metrics.core.Gauge<T> gauge, com.yammer.metrics.core.Gauge<G> globalGauge)` Create a gauge that will be part of a merged version of all column families.
    `protected ColumnFamilyMetrics.ColumnFamilyHistogram` | `createColumnFamilyHistogram(java.lang.String name, com.yammer.metrics.core.Histogram keyspaceHistogram)` Create a histogram-like interface that will register both a CF, keyspace and global level histogram and forward any updates to both
    `void` | `release()` Release all associated metrics.
    `void` | `updateSSTableIterated(int count)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### memtableOnHeapSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> memtableOnHeapSize

      Total amount of data stored in the memtable that resides on-heap, including column related overhead and overwritten rows.

    - #### memtableOffHeapSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> memtableOffHeapSize

      Total amount of data stored in the memtable that resides off-heap, including column related overhead and overwritten rows.

    - #### memtableLiveDataSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> memtableLiveDataSize

      Total amount of live data stored in the memtable, excluding any data structure overhead

    - #### allMemtablesOnHeapSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> allMemtablesOnHeapSize

      Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.

    - #### allMemtablesOffHeapSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> allMemtablesOffHeapSize

      Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.

    - #### allMemtablesLiveDataSize

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

      Total number of columns present in the memtable.

    - #### memtableSwitchCount

          public final com.yammer.metrics.core.Counter memtableSwitchCount

      Number of times flush has resulted in the memtable being switched out.

    - #### compressionRatio

          public final com.yammer.metrics.core.Gauge<java.lang.Double> compressionRatio

      Current compression ratio for all SSTables

    - #### estimatedRowSizeHistogram

          public final com.yammer.metrics.core.Gauge<long[]> estimatedRowSizeHistogram

      Histogram of estimated row size (in bytes).

    - #### estimatedColumnCountHistogram

          public final com.yammer.metrics.core.Gauge<long[]> estimatedColumnCountHistogram

      Histogram of estimated number of columns.

    - #### sstablesPerReadHistogram

          public final ColumnFamilyMetrics.ColumnFamilyHistogram sstablesPerReadHistogram

      Histogram of the number of sstable data files accessed per 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.yammer.metrics.core.Counter pendingFlushes

      Estimated number of tasks pending for this column family

    - #### pendingCompactions

          public final com.yammer.metrics.core.Gauge<java.lang.Integer> pendingCompactions

      Estimate of number of pending compactios for this CF

    - #### liveSSTableCount

          public final com.yammer.metrics.core.Gauge<java.lang.Integer> liveSSTableCount

      Number of SSTables on disk for this CF

    - #### liveDiskSpaceUsed

          public final com.yammer.metrics.core.Counter liveDiskSpaceUsed

      Disk space used by SSTables belonging to this CF

    - #### totalDiskSpaceUsed

          public final com.yammer.metrics.core.Counter totalDiskSpaceUsed

      Total disk space used by SSTables belonging to this CF, including obsolete ones waiting to be GC'd

    - #### minRowSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> minRowSize

      Size of the smallest compacted row

    - #### maxRowSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> maxRowSize

      Size of the largest compacted row

    - #### meanRowSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> meanRowSize

      Size of the smallest compacted row

    - #### bloomFilterFalsePositives

          public final com.yammer.metrics.core.Gauge<java.lang.Long> bloomFilterFalsePositives

      Number of false positives in bloom filter

    - #### recentBloomFilterFalsePositives

          public final com.yammer.metrics.core.Gauge<java.lang.Long> recentBloomFilterFalsePositives

      Number of false positives in bloom filter from last read

    - #### bloomFilterFalseRatio

          public final com.yammer.metrics.core.Gauge<java.lang.Double> bloomFilterFalseRatio

      False positive ratio of bloom filter

    - #### recentBloomFilterFalseRatio

          public final com.yammer.metrics.core.Gauge<java.lang.Double> recentBloomFilterFalseRatio

      False positive ratio of bloom filter from last read

    - #### bloomFilterDiskSpaceUsed

          public final com.yammer.metrics.core.Gauge<java.lang.Long> bloomFilterDiskSpaceUsed

      Disk space used by bloom filter

    - #### keyCacheHitRate

          public final com.yammer.metrics.core.Gauge<java.lang.Double> keyCacheHitRate

      Key cache hit rate for this CF

    - #### tombstoneScannedHistogram

          public final ColumnFamilyMetrics.ColumnFamilyHistogram tombstoneScannedHistogram

      Tombstones scanned in queries on this CF

    - #### liveScannedHistogram

          public final ColumnFamilyMetrics.ColumnFamilyHistogram liveScannedHistogram

      Live cells scanned in queries on this CF

    - #### trueSnapshotsSize

          public final com.yammer.metrics.core.Gauge<java.lang.Long> trueSnapshotsSize

      Disk space used by snapshot files which

    - #### rowCacheHitOutOfRange

          public final com.yammer.metrics.core.Counter rowCacheHitOutOfRange

      Row cache hits, but result out of range

    - #### rowCacheHit

          public final com.yammer.metrics.core.Counter rowCacheHit

      Number of row cache hits

    - #### rowCacheMiss

          public final com.yammer.metrics.core.Counter rowCacheMiss

      Number of row cache misses

    - #### casPrepare

          public final LatencyMetrics casPrepare

      CAS Prepare metrics

    - #### casPropose

          public final LatencyMetrics casPropose

      CAS Propose metrics

    - #### casCommit

          public final LatencyMetrics casCommit

      CAS Commit metrics

    - #### coordinatorReadLatency

          public final com.yammer.metrics.core.Timer coordinatorReadLatency

    - #### coordinatorScanLatency

          public final com.yammer.metrics.core.Timer coordinatorScanLatency

    - #### waitingOnFreeMemtableSpace

          public final com.yammer.metrics.core.Timer waitingOnFreeMemtableSpace

      Time spent waiting for free memtable space, either on- or off-heap

    - #### speculativeRetries

          public final com.yammer.metrics.core.Counter speculativeRetries

    - #### sstablesPerRead

          @Deprecated
          public final EstimatedHistogram sstablesPerRead

      Deprecated.

    - #### recentSSTablesPerRead

          @Deprecated
          public final EstimatedHistogram recentSSTablesPerRead

      Deprecated.

    - #### globalReadLatency

          public static final LatencyMetrics globalReadLatency

    - #### globalWriteLatency

          public static final LatencyMetrics globalWriteLatency

    - #### globalRangeLatency

          public static final LatencyMetrics globalRangeLatency

    - #### allColumnFamilyMetrics

          public static final java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<com.yammer.metrics.core.Metric>> allColumnFamilyMetrics

      stores metrics that will be rolled into a single global metric

    - #### all

          public static final java.util.Set<java.lang.String> all

      Stores all metric names created that can be used when unregistering

  - ### Constructor Detail

    - #### ColumnFamilyMetrics

          public ColumnFamilyMetrics(ColumnFamilyStore cfs)

      Creates metrics for given `ColumnFamilyStore`.
      Parameters:
        `cfs` - ColumnFamilyStore to measure metrics

  - ### Method Detail

    - #### updateSSTableIterated

          public void updateSSTableIterated(int count)

    - #### release

          public void release()

      Release all associated metrics.

    - #### createColumnFamilyGauge

          protected <T extends java.lang.Number> com.yammer.metrics.core.Gauge<T> createColumnFamilyGauge(java.lang.String name,
                                                                                              com.yammer.metrics.core.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

    - #### createColumnFamilyGauge

          protected <G,T> com.yammer.metrics.core.Gauge<T> createColumnFamilyGauge(java.lang.String name,
                                                                       com.yammer.metrics.core.Gauge<T> gauge,
                                                                       com.yammer.metrics.core.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

    - #### createColumnFamilyCounter

          protected com.yammer.metrics.core.Counter createColumnFamilyCounter(java.lang.String name)

      Creates a counter that will also have a global counter thats the sum of all counters across different column families

    - #### createColumnFamilyHistogram

          protected ColumnFamilyMetrics.ColumnFamilyHistogram createColumnFamilyHistogram(java.lang.String name,
                                                                              com.yammer.metrics.core.Histogram keyspaceHistogram)

      Create a histogram-like interface that will register both a CF, keyspace and global level histogram and forward any updates to both

Copyright © 2014 The Apache Software Foundation