cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: add get[Row|Key]CacheEntries to CacheServiceMBean patch by Chris Burroughs; reviewed by jbellis for CASSANDRA-4859
Date Tue, 30 Oct 2012 15:34:35 GMT
Updated Branches:
  refs/heads/cassandra-1.1 5e15927ff -> 99b245d31


add get[Row|Key]CacheEntries to CacheServiceMBean
patch by Chris Burroughs; reviewed by jbellis for CASSANDRA-4859


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

Branch: refs/heads/cassandra-1.1
Commit: 99b245d3184c26bd29f4e17120a55bdb1a4b2912
Parents: 5e15927
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Oct 30 10:22:22 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Oct 30 10:22:22 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/service/CacheService.java |   10 ++++++++++
 .../cassandra/service/CacheServiceMBean.java       |    4 +++-
 3 files changed, 14 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b245d3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 05b7ef3..e69298f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * add get[Row|Key]CacheEntries to CacheServiceMBean (CASSANDRA-4859)
  * fix get_paged_slice to wrap to next row correctly (CASSANDRA-4816)
  * fix indexing empty column values (CASSANDRA-4832)
  * allow JdbcDate to compose null Date objects (CASSANDRA-4830)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b245d3/src/java/org/apache/cassandra/service/CacheService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CacheService.java b/src/java/org/apache/cassandra/service/CacheService.java
index bb57801..d63e775 100644
--- a/src/java/org/apache/cassandra/service/CacheService.java
+++ b/src/java/org/apache/cassandra/service/CacheService.java
@@ -248,11 +248,21 @@ public class CacheService implements CacheServiceMBean
         return rowCache.weightedSize();
     }
 
+    public long getRowCacheEntries()
+    {
+        return rowCache.size();
+    }
+
     public long getKeyCacheSize()
     {
         return keyCache.weightedSize() * AVERAGE_KEY_CACHE_ROW_SIZE;
     }
 
+    public long getKeyCacheEntries()
+    {
+        return keyCache.size();
+    }
+
     public void reduceCacheSizes()
     {
         reduceRowCacheSize();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b245d3/src/java/org/apache/cassandra/service/CacheServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CacheServiceMBean.java b/src/java/org/apache/cassandra/service/CacheServiceMBean.java
index bf9e46e..ccc7a42 100644
--- a/src/java/org/apache/cassandra/service/CacheServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/CacheServiceMBean.java
@@ -54,9 +54,11 @@ public interface CacheServiceMBean
     public long getKeyCacheCapacityInBytes();
     public void setKeyCacheCapacityInMB(long capacity);
 
-    public long getRowCacheSize();
+    public long getRowCacheSize(); // in bytes
+    public long getRowCacheEntries();
 
     public long getKeyCacheSize();
+    public long getKeyCacheEntries();
 
     /**
      * sets each cache's maximum capacity to "reduce_cache_capacity_to" of its current size


Mime
View raw message