cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1102487 - in /cassandra/branches/cassandra-0.8/src: java/org/apache/cassandra/cli/CliClient.java resources/org/apache/cassandra/cli/CliHelp.yaml
Date Thu, 12 May 2011 22:27:44 GMT
Author: brandonwilliams
Date: Thu May 12 22:27:44 2011
New Revision: 1102487

URL: http://svn.apache.org/viewvc?rev=1102487&view=rev
Log:
Make help and validation types match in cassandra-cli.
Patch by Pavel Yaskevich, revewied by Jackson Chung for CASSANDRA-2615

Modified:
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/branches/cassandra-0.8/src/resources/org/apache/cassandra/cli/CliHelp.yaml

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java?rev=1102487&r1=1102486&r2=1102487&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java Thu
May 12 22:27:44 2011
@@ -61,13 +61,14 @@ public class CliClient
      */
     public enum Function
     {
-        BYTES       (BytesType.instance),
-        INTEGER     (IntegerType.instance),
-        LONG        (LongType.instance),
-        LEXICALUUID (LexicalUUIDType.instance),
-        TIMEUUID    (TimeUUIDType.instance),
-        UTF8        (UTF8Type.instance),
-        ASCII       (AsciiType.instance);
+        BYTES         (BytesType.instance),
+        INTEGER       (IntegerType.instance),
+        LONG          (LongType.instance),
+        LEXICALUUID   (LexicalUUIDType.instance),
+        TIMEUUID      (TimeUUIDType.instance),
+        UTF8          (UTF8Type.instance),
+        ASCII         (AsciiType.instance),
+        COUNTERCOLUMN (CounterColumnType.instance);
 
         private AbstractType validator;
         
@@ -1376,6 +1377,9 @@ public class CliClient
             return;
         }
 
+        // making string representation look property e.g. o.a.c.db.marshal.UTF8Type
+        defaultType = comparator.getClass().getName();
+
         if (assumptionElement.equals("COMPARATOR"))
         {
             columnFamily.setComparator_type(defaultType);

Modified: cassandra/branches/cassandra-0.8/src/resources/org/apache/cassandra/cli/CliHelp.yaml
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/resources/org/apache/cassandra/cli/CliHelp.yaml?rev=1102487&r1=1102486&r2=1102487&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/resources/org/apache/cassandra/cli/CliHelp.yaml (original)
+++ cassandra/branches/cassandra-0.8/src/resources/org/apache/cassandra/cli/CliHelp.yaml Thu
May 12 22:27:44 2011
@@ -1074,13 +1074,13 @@ commands:
         - type: Validator type to use when processing values.
 
           Supported values are:
-            - AsciiType
-            - BytesType
-            - CounterColumnType (distributed counter column)
-            - IntegerType (a generic variable-length integer type)
-            - LexicalUUIDType
-            - LongType
-            - UTF8Type
+            - ascii
+            - bytes
+            - counterColumn (distributed counter column)
+            - integer (a generic variable-length integer type)
+            - lexicalUUID
+            - long
+            - utf8
 
           It is also valid to specify the fully-qualified class name to a class that
           extends org.apache.Cassandra.db.marshal.AbstractType.



Mime
View raw message