cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [09/20] git commit: Track metrics at a keyspace level
Date Fri, 13 Jun 2014 12:53:58 GMT
Track metrics at a keyspace level

Patch by brandonwilliams, reviewed by yukim for CASSANDRA-6539


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

Branch: refs/heads/trunk
Commit: be79ba500e6e63ade6e337374f935e69a691086e
Parents: cecd1da
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Jun 12 18:49:09 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Jun 13 07:47:49 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                    | 1 -
 src/java/org/apache/cassandra/db/Keyspace.java | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/be79ba50/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index db94066..e3bd64b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,7 +16,6 @@
  * Fix infinite loop on exception while streaming (CASSANDRA-7330)
  * Reference sstables before populating key cache (CASSANDRA-7234)
 Merged from 1.2:
-1.2.17
  * Track metrics at a keyspace level (CASSANDRA-6539)
  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
  * Enable keepalive for native protocol (CASSANDRA-7380)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/be79ba50/src/java/org/apache/cassandra/db/Keyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java
index 06df066..308d8ef 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -27,6 +27,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
+import org.apache.cassandra.metrics.KeyspaceMetrics;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,6 +64,8 @@ public class Keyspace
      */
     public static final ReentrantReadWriteLock switchLock = new ReentrantReadWriteLock();
 
+    public final KeyspaceMetrics metric;
+
     // It is possible to call Keyspace.open without a running daemon, so it makes sense to
ensure
     // proper directories here as well as in CassandraDaemon.
     static
@@ -262,6 +265,7 @@ public class Keyspace
         metadata = Schema.instance.getKSMetaData(keyspaceName);
         assert metadata != null : "Unknown keyspace " + keyspaceName;
         createReplicationStrategy(metadata);
+        metric = new KeyspaceMetrics(this);
 
         for (CFMetaData cfm : new ArrayList<CFMetaData>(metadata.cfMetaData().values()))
         {


Mime
View raw message