cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject [2/2] git commit: Change nodetool setcachecapcity to manipulate global caches patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4563
Date Wed, 22 Aug 2012 22:01:06 GMT
Change nodetool setcachecapcity to manipulate global caches
patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4563


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

Branch: refs/heads/trunk
Commit: dbf99d6740917cdecc342d84e1e3bec03613d8ba
Parents: 8173c6f
Author: Pavel Yaskevich <xedin@apache.org>
Authored: Wed Aug 22 12:28:24 2012 +0300
Committer: Pavel Yaskevich <xedin@apache.org>
Committed: Thu Aug 23 00:58:03 2012 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 src/java/org/apache/cassandra/tools/NodeCmd.java   |    6 +++---
 src/java/org/apache/cassandra/tools/NodeProbe.java |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dbf99d67/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3c7163a..b5ee914 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.1.5
  * increase stack size under Java7 to 180K
  * Log(info) schema changes (CASSANDRA-4547)
+ * Change nodetool setcachecapcity to manipulate global caches (CASSANDRA-4563)
 
 
 1.1.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/dbf99d67/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index b73e96a..d0ec068 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -182,13 +182,13 @@ public class NodeCmd
         addCmdHelp(header, "cfhistograms <keyspace> <cfname>", "Print statistic
histograms for a given column family");
         addCmdHelp(header, "refresh <keyspace> <cf-name>", "Load newly placed
SSTables to the system without restart.");
         addCmdHelp(header, "rebuild_index <keyspace> <cf-name> <idx1,idx1>",
"a full rebuilds of native secondry index for a given column family. IndexNameExample: Standard3.IdxName,Standard3.IdxName1");
+        addCmdHelp(header, "setcachecapacity <key-cache-capacity> <row-cache-capacity>",
"Set global key and row cache capacities (in MB units).");
 
         // Three args
         addCmdHelp(header, "getendpoints <keyspace> <cf> <key>", "Print
the end points that owns the key");
         addCmdHelp(header, "getsstables <keyspace> <cf> <key>", "Print
the sstable filenames that own the key");
 
         // Four args
-        addCmdHelp(header, "setcachecapacity <keyspace> <cfname> <keycachecapacity>
<rowcachecapacity>", "Set the key and row cache capacities of a given column family");
         addCmdHelp(header, "setcompactionthreshold <keyspace> <cfname> <minthreshold>
<maxthreshold>", "Set the min and max compaction thresholds for a given column family");
         addCmdHelp(header, "stop <compaction_type>", "Supported types are COMPACTION,
VALIDATION, CLEANUP, SCRUB, INDEX_BUILD");
 
@@ -821,8 +821,8 @@ public class NodeCmd
                     break;
 
                 case SETCACHECAPACITY :
-                    if (arguments.length != 4) { badUse("setcachecapacity requires ks, cf,
keycachecap, and rowcachecap args."); }
-                    probe.setCacheCapacities(arguments[0], arguments[1], Integer.parseInt(arguments[2]),
Integer.parseInt(arguments[3]));
+                    if (arguments.length != 2) { badUse("setcachecapacity requires key-cache-capacity,
and row-cache-capacity args."); }
+                    probe.setCacheCapacities(Integer.parseInt(arguments[0]), Integer.parseInt(arguments[1]));
                     break;
 
                 case SETCOMPACTIONTHRESHOLD :

http://git-wip-us.apache.org/repos/asf/cassandra/blob/dbf99d67/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 5488d75..c40891c 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -443,7 +443,7 @@ public class NodeProbe
         cfsProxy.setCompactionThresholds(minimumCompactionThreshold, maximumCompactionThreshold);
     }
 
-    public void setCacheCapacities(String tableName, String cfName, int keyCacheCapacity,
int rowCacheCapacity)
+    public void setCacheCapacities(int keyCacheCapacity, int rowCacheCapacity)
     {
         try
         {


Mime
View raw message