Re: Issue with cassandra-cli "assume"

2012-03-23 Thread Drew Kutcharian
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  comparator as ;
assume  sub_comparator as ;
assume  validator as ;
assume  keys as ;

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
 
 
>> 
> 



Re: Issue with cassandra-cli "assume"

2012-03-23 Thread Dave Brosius
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








Re: Issue with cassandra-cli "assume"

2012-03-23 Thread Drew Kutcharian
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
>> 
>> 
> 



Re: Issue with cassandra-cli "assume"

2012-03-23 Thread Dave Brosius

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






Issue with cassandra-cli "assume"

2012-03-23 Thread Drew Kutcharian
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