org.apache.cassandra.metrics

## Class CompactionMetrics

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

- All Implemented Interfaces:
    CompactionManager.CompactionExecutorStatsCollector

      public class CompactionMetrics
      extends java.lang.Object
      implements CompactionManager.CompactionExecutorStatsCollector

  Metrics for compaction.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `com.codahale.metrics.Counter` | `bytesCompacted` Total number of bytes compacted since server [re]start
    `com.codahale.metrics.Gauge<java.lang.Long>` | `completedTasks` Number of completed compactions since server [re]start
    `static MetricNameFactory` | `factory`
    `com.codahale.metrics.Gauge<java.lang.Integer>` | `pendingTasks` Estimated number of compactions remaining to perform
    `com.codahale.metrics.Gauge<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>>>` | `pendingTasksByTableName` Estimated number of compactions remaining to perform, group by keyspace and then table name
    `com.codahale.metrics.Meter` | `totalCompactionsCompleted` Total number of compactions since server [re]start

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompactionMetrics(java.util.concurrent.ThreadPoolExecutor... collectors)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginCompaction(CompactionInfo.Holder ci)`
    `void` | `finishCompaction(CompactionInfo.Holder ci)`
    `static java.util.List<CompactionInfo.Holder>` | `getCompactions()`

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

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

- - ### Field Detail

    - #### factory

          public static final MetricNameFactory factory

    - #### pendingTasks

          public final com.codahale.metrics.Gauge<java.lang.Integer> pendingTasks

      Estimated number of compactions remaining to perform

    - #### pendingTasksByTableName

          public final com.codahale.metrics.Gauge<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>>> pendingTasksByTableName

      Estimated number of compactions remaining to perform, group by keyspace and then table name

    - #### completedTasks

          public final com.codahale.metrics.Gauge<java.lang.Long> completedTasks

      Number of completed compactions since server [re]start

    - #### totalCompactionsCompleted

          public final com.codahale.metrics.Meter totalCompactionsCompleted

      Total number of compactions since server [re]start

    - #### bytesCompacted

          public final com.codahale.metrics.Counter bytesCompacted

      Total number of bytes compacted since server [re]start

  - ### Constructor Detail

    - #### CompactionMetrics

          public CompactionMetrics(java.util.concurrent.ThreadPoolExecutor... collectors)

  - ### Method Detail

    - #### beginCompaction

          public void beginCompaction(CompactionInfo.Holder ci)

      Specified by:
        `beginCompaction` in interface `CompactionManager.CompactionExecutorStatsCollector`

    - #### finishCompaction

          public void finishCompaction(CompactionInfo.Holder ci)

      Specified by:
        `finishCompaction` in interface `CompactionManager.CompactionExecutorStatsCollector`

    - #### getCompactions

          public static java.util.List<CompactionInfo.Holder> getCompactions()

Copyright © 2018 The Apache Software Foundation