cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Kutcharian <d...@venarc.com>
Subject Re: Issue with cassandra-cli "assume"
Date Sat, 24 Mar 2012 02:52:06 GMT
Well if what you're saying is true, then the help is inconsistent:

> It is also valid to specify the fully-qualified class name to a class that
> extends org.apache.Cassandra.db.marshal.AbstractType.


[default@unknown] help assume;
assume <cf> comparator as <type>;
assume <cf> sub_comparator as <type>;
assume <cf> validator as <type>;
assume <cf> keys as <type>;

Assume one of the attributes (comparator, sub_comparator, validator or keys)
of the given column family match specified type. The specified type will
be used when displaying data returned from the column family.

This statement does not change the column family definition stored in
Cassandra. It only affects the cli and how it will transform values
to be sent to and interprets results from Cassandra.

If results from Cassandra do not validate according to the assumptions an
error is displayed in the cli.

Required Parameters:
- cf: Name of the column family to make the assumption about.

- type: Validator type to use when processing values.

  Supported values are:
    - ascii
    - bytes
    - counterColumn (distributed counter column)
    - int
    - 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.

Examples:
assume Standard1 comparator as lexicaluuid;
assume Standard1 keys as ascii;





On Mar 23, 2012, at 7:11 PM, Dave Brosius wrote:

> I don't think thats possible with the cli. You'd have to embellish CliClient.Function
> 
> 
> 
> On 03/23/2012 09:59 PM, Drew Kutcharian wrote:
>> I actually have a custom type, I put the BytesType in the example to demonstrate
the issue is not with my custom type.
>> 
>> -- Drew
>> 
>> On Mar 23, 2012, at 6:46 PM, Dave Brosius wrote:
>> 
>>> I think you want
>>> 
>>> assume UserDetails validator as bytes;
>>> 
>>> 
>>> 
>>> On 03/23/2012 08:09 PM, Drew Kutcharian wrote:
>>>> Hi Everyone,
>>>> 
>>>> I'm having an issue with cassandra-cli's assume command with a custom type.
I tried it with the built-in BytesType and got the same error:
>>>> 
>>>> [default@test] assume UserDetails validator as org.apache.cassandra.db.marshal.BytesType;
>>>> Syntax error at position 35: missing EOF at '.'
>>>> 
>>>> I also tried it with single and double quotes with no success:
>>>> [default@test] assume UserDetails validator as 'org.apache.cassandra.db.marshal.BytesType';
>>>> Syntax error at position 32: mismatched input ''org.apache.cassandra.db.marshal.BytesType''
expecting Identifier
>>>> 
>>>> Is this a bug?
>>>> 
>>>> I'm using Cassanda 1.0.7 on Mac OSX Lion.
>>>> 
>>>> Thanks,
>>>> 
>>>> Drew
>>>> 
>>>> 
>> 
> 


Mime
View raw message