cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [16/20] git commit: Track metrics at a keyspace level
Date Fri, 13 Jun 2014 12:54:05 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/55c48c2a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/55c48c2a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/55c48c2a

Branch: refs/heads/cassandra-2.1
Commit: 55c48c2a001ff659722236df5636a45a000fdb46
Parents: 68dd634
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:50:06 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/55c48c2a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 147a096..35c02f9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -19,7 +19,6 @@ Merged from 2.0:
  * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
  * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 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/55c48c2a/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 1c89cc4..cfae05c 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -32,6 +32,7 @@ import java.util.concurrent.Future;
 
 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;
 
@@ -62,6 +63,8 @@ public class Keyspace
 
     private static final Logger logger = LoggerFactory.getLogger(Keyspace.class);
 
+    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
@@ -270,6 +273,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