cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/8] git commit: Track metrics at a keyspace level
Date Fri, 13 Jun 2014 12:45:14 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 d509fe1a5 -> 7065b1bdf
  refs/heads/trunk 85956ae68 -> e428ae04c


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/a4504388
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4504388
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4504388

Branch: refs/heads/trunk
Commit: a4504388a8761b42f4f28604d98ac668ca496d55
Parents: d509fe1
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Jun 12 18:42:21 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Jun 12 18:47:16 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4504388/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f37eda4..28b5f29 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 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)
  * Check internal addresses for seeds (CASSANDRA-6523)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4504388/src/java/org/apache/cassandra/db/Table.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Table.java b/src/java/org/apache/cassandra/db/Table.java
index e6df982..611fd9a 100644
--- a/src/java/org/apache/cassandra/db/Table.java
+++ b/src/java/org/apache/cassandra/db/Table.java
@@ -42,6 +42,7 @@ import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.locator.AbstractReplicationStrategy;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.tracing.Tracing;
+import org.apache.cassandra.metrics.KeyspaceMetrics;
 
 /**
  * It represents a Keyspace.
@@ -74,6 +75,7 @@ public class Table
     private final ConcurrentMap<UUID, ColumnFamilyStore> columnFamilyStores = new ConcurrentHashMap<UUID,
ColumnFamilyStore>();
     private final Object[] indexLocks;
     private volatile AbstractReplicationStrategy replicationStrategy;
+    public final KeyspaceMetrics metric;
     public static final Function<String,Table> tableTransformer = new Function<String,
Table>()
     {
         public Table apply(String tableName)
@@ -132,6 +134,7 @@ public class Table
             {
                 for (ColumnFamilyStore cfs : t.getColumnFamilyStores())
                     t.unloadCf(cfs);
+                t.metric.release();
             }
             return t;
         }
@@ -271,6 +274,7 @@ public class Table
             logger.debug("Initializing {}.{}", name, cfm.cfName);
             initCf(cfm.cfId, cfm.cfName, loadSSTables);
         }
+        this.metric = new KeyspaceMetrics(this);
     }
 
     public void createReplicationStrategy(KSMetaData ksm)


Mime
View raw message