cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1090644 - in /cassandra/trunk: README.txt src/java/org/apache/cassandra/cli/CliClient.java src/java/org/apache/cassandra/cli/CliUserHelp.java
Date Sat, 09 Apr 2011 18:21:05 GMT
Author: jbellis
Date: Sat Apr  9 18:21:05 2011
New Revision: 1090644

URL: http://svn.apache.org/viewvc?rev=1090644&view=rev
Log:
add key_validation_class support to cli
patch by Pavel Yaskevich; reviewed by jbellis for CASSANDRA-2432

Modified:
    cassandra/trunk/README.txt
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java

Modified: cassandra/trunk/README.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/README.txt?rev=1090644&r1=1090643&r2=1090644&view=diff
==============================================================================
--- cassandra/trunk/README.txt (original)
+++ cassandra/trunk/README.txt Sat Apr  9 18:21:05 2011
@@ -62,7 +62,7 @@ something slightly more interesting...
   ece86bde-dc55-11df-8240-e700f669bcfc
   [default@unknown] use Keyspace1;
   Authenticated to keyspace: Keyspace1
-  [default@Keyspace1] create column family Users with comparator=UTF8Type and default_validation_class=UTF8Type;
+  [default@Keyspace1] create column family Users with comparator=UTF8Type and default_validation_class=UTF8Type
and key_validation_class=UTF8Type;
   737c7a71-dc56-11df-8240-e700f669bcfc
 
   [default@KS1] set Users[jsmith][first] = 'John';

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=1090644&r1=1090643&r2=1090644&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Sat Apr  9 18:21:05 2011
@@ -1108,6 +1108,9 @@ public class CliClient extends CliUserHe
             case ROW_CACHE_PROVIDER:
                 cfDef.setRow_cache_provider(mValue);
                 break;
+            case KEY_VALIDATION_CLASS:
+                cfDef.setKey_validation_class(CliUtils.unescapeSQLString(mValue));
+                break;
             default:
                 //must match one of the above or we'd throw an exception at the valueOf statement
above.
                 assert(false);
@@ -1512,7 +1515,10 @@ public class CliClient extends CliUserHe
                 {
                     sessionState.out.printf("    \"%s\"%n", cf_def.comment);
                 }
-                
+
+                if (cf_def.key_validation_class != null)
+                    sessionState.out.printf("      Key Validation Class: %s%n", cf_def.key_validation_class);
+
                 sessionState.out.printf("      Columns sorted by: %s%s%n", cf_def.comparator_type,
cf_def.column_type.equals("Super") ? "/" + cf_def.subcomparator_type : "");
                 sessionState.out.printf("      Row cache size / save period in seconds: %s/%s%n",
cf_def.row_cache_size, cf_def.row_cache_save_period_in_seconds);
                 sessionState.out.printf("      Key cache size / save period in seconds: %s/%s%n",
cf_def.key_cache_size, cf_def.key_cache_save_period_in_seconds);

Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java?rev=1090644&r1=1090643&r2=1090644&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java Sat Apr  9 18:21:05
2011
@@ -51,6 +51,7 @@ public class CliUserHelp {
         MAX_COMPACTION_THRESHOLD,
         REPLICATE_ON_WRITE,
         ROW_CACHE_PROVIDER,
+        KEY_VALIDATION_CLASS
     }
 
     protected EnumMap<ColumnFamilyArgument, String> argumentExplanations = new EnumMap<ColumnFamilyArgument,
String>(ColumnFamilyArgument.class)



Mime
View raw message