cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1025701 - in /cassandra/trunk: CHANGES.txt src/java/org/apache/cassandra/cli/Cli.g src/java/org/apache/cassandra/cli/CliClient.java
Date Wed, 20 Oct 2010 19:49:32 GMT
Author: jbellis
Date: Wed Oct 20 19:49:32 2010
New Revision: 1025701

URL: http://svn.apache.org/viewvc?rev=1025701&view=rev
Log:
cli support for updating schema memtable settings.
patch by Nate McCall; reviewed by jbellis for CASSANDRA-1634

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1025701&r1=1025700&r2=1025701&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Oct 20 19:49:32 2010
@@ -50,6 +50,7 @@ dev
  * add cli sanity tests (CASSANDRA-1582)
  * update GC settings in cassandra.bat (CASSANDRA-1636)
  * cli support for index queries (CASSANDRA-1635)
+ * cli support for updating schema memtable settings (CASSANDRA-1634)
 
 
 0.7-beta2

Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g?rev=1025701&r1=1025700&r2=1025701&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g Wed Oct 20 19:49:32 2010
@@ -300,6 +300,7 @@ attrValue
     : arrayConstruct
     | attrValueString
     | attrValueInt
+    | attrValueDouble
     ;
 
 
@@ -342,6 +343,8 @@ attr_name: Identifier;
 attrValueString: (Identifier | StringLiteral);
       
 attrValueInt: IntegerLiteral;
+
+attrValueDouble: DoubleLiteral;
   
 objectName: Identifier;
 
@@ -450,6 +453,9 @@ Alnum
 IntegerLiteral
    : Digit+
    ;
+   
+DoubleLiteral
+   : Digit+ DOT Digit+;
 
 Identifier
     : (Letter | Alnum) (Alnum | '_' | '-' )*

Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java?rev=1025701&r1=1025700&r2=1025701&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Wed Oct 20 19:49:32 2010
@@ -93,7 +93,10 @@ public class CliClient 
         KEY_CACHE_SIZE,
         READ_REPAIR_CHANCE,
         GC_GRACE_SECONDS,
-        COLUMN_METADATA
+        COLUMN_METADATA,
+        MEMTABLE_OPERATIONS_IN_MILLIONS,
+        MEMTABLE_THROUGHPUT_IN_MB,
+        MEMTABLE_FLUSH_AFTER_MINS
     }
 
     /*
@@ -1139,6 +1142,18 @@ public class CliClient 
                 cfDef.setColumn_metadata(getCFColumnMetaFromTree(arrayOfMetaAttributes));
                 break;
 
+            case MEMTABLE_OPERATIONS_IN_MILLIONS:
+                cfDef.setMemtable_operations_in_millions(Double.parseDouble(mValue));
+                break;
+            
+            case MEMTABLE_FLUSH_AFTER_MINS:
+                cfDef.setMemtable_flush_after_mins(Integer.parseInt(mValue));
+                break;
+                
+            case MEMTABLE_THROUGHPUT_IN_MB:
+                cfDef.setMemtable_throughput_in_mb(Integer.parseInt(mValue));
+                break;
+                
             default:
                 //must match one of the above or we'd throw an exception at the valueOf statement
above.
                 assert(false);



Mime
View raw message