Skip to content

Commit

Permalink
Make help and validation types match in cassandra-cli.
Browse files Browse the repository at this point in the history
Patch by Pavel Yaskevich, revewied by Jackson Chung for CASSANDRA-2615

git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.8@1102487 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
driftx committed May 12, 2011
1 parent 4b806e8 commit 35d8f53
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
18 changes: 11 additions & 7 deletions src/java/org/apache/cassandra/cli/CliClient.java
Expand Up @@ -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;

Expand Down Expand Up @@ -1376,6 +1377,9 @@ private void executeAssumeStatement(Tree statement)
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);
Expand Down
14 changes: 7 additions & 7 deletions src/resources/org/apache/cassandra/cli/CliHelp.yaml
Expand Up @@ -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.
Expand Down

0 comments on commit 35d8f53

Please sign in to comment.