cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject cassandra git commit: Expose EstimatedHistogram metrics for range slices
Date Tue, 20 Jan 2015 15:38:42 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 cc0831c60 -> 5a8497647


Expose EstimatedHistogram metrics for range slices

patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for
CASSANDRA-8627


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5a849764
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5a849764
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5a849764

Branch: refs/heads/cassandra-2.1
Commit: 5a849764791f7bedd737666a48b53e536f9816ab
Parents: cc0831c
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Tue Jan 20 18:37:58 2015 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Jan 20 18:37:58 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 25 ++++++++++++++
 .../cassandra/db/ColumnFamilyStoreMBean.java    | 35 ++++++++++++++++++++
 3 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a849764/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 494376d..695ae6f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
  * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
  * Fix NPE when passing wrong argument in ALTER TABLE statement (CASSANDRA-8355)
  * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a849764/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index a92c9c2..af8f0ed 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1486,6 +1486,31 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         return metric.writeLatency.recentLatencyHistogram.getBuckets(true);
     }
 
+    public long getRangeCount()
+    {
+        return metric.rangeLatency.latency.count();
+    }
+
+    public double getRecentRangeLatencyMicros()
+    {
+        return metric.rangeLatency.getRecentLatency();
+    }
+
+    public long[] getLifetimeRangeLatencyHistogramMicros()
+    {
+        return metric.rangeLatency.totalLatencyHistogram.getBuckets(false);
+    }
+
+    public long[] getRecentRangeLatencyHistogramMicros()
+    {
+        return metric.rangeLatency.recentLatencyHistogram.getBuckets(true);
+    }
+
+    public long getTotalRangeLatencyMicros()
+    {
+        return metric.rangeLatency.totalLatency.count();
+    }
+
     public ColumnFamily getColumnFamily(DecoratedKey key,
                                         Composite start,
                                         Composite finish,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a849764/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index 1e9acc5..3418b26 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -146,6 +146,41 @@ public interface ColumnFamilyStoreMBean
     public double getRecentWriteLatencyMicros();
 
     /**
+     * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#rangeLatency
+     * @return the number of range slice operations on this column family
+     */
+    @Deprecated
+    public long getRangeCount();
+
+    /**
+     * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#rangeLatency
+     * @return total range slice latency (divide by getRangeCount() for average)
+     */
+    @Deprecated
+    public long getTotalRangeLatencyMicros();
+
+    /**
+     * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#rangeLatency
+     * @return an array representing the latency histogram
+     */
+    @Deprecated
+    public long[] getLifetimeRangeLatencyHistogramMicros();
+
+    /**
+     * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#rangeLatency
+     * @return an array representing the latency histogram
+     */
+    @Deprecated
+    public long[] getRecentRangeLatencyHistogramMicros();
+
+    /**
+     * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#rangeLatency
+     * @return average latency per range slice operation since the last call
+     */
+    @Deprecated
+    public double getRecentRangeLatencyMicros();
+
+    /**
      * @see org.apache.cassandra.metrics.ColumnFamilyMetrics#pendingFlushes
      * @return the estimated number of tasks pending for this column family
      */


Mime
View raw message