cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: CQL / ASSUME for keys
Date Tue, 03 Jul 2012 00:03:39 GMT
> I'm trying to do the following : update keyspace.CF set '2' = '2' + 12
> WHERE KEY = 'mykey';
CQL does not support expressions in the SET clause. 

http://www.datastax.com/docs/1.0/references/cql/UPDATE

Cheers


-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 28/06/2012, at 2:08 AM, Alain RODRIGUEZ wrote:

> Hi,
> 
> I'm trying to do the following : update keyspace.CF set '2' = '2' + 12
> WHERE KEY = 'mykey';
> And got this answer            : "Bad Request: cannot parse 'mykey' as
> hex bytes"
> 
> Using this doesn't help        : "assume keyspace.CF(KEY) VALUES ARE
> text; (Found here
> http://www.datastax.com/docs/1.0/references/cql/ASSUME and I'm using
> C* 1.0.9)
> 
> Show schema in cli gives :
> 
> create column family CF
>  with column_type = 'Standard'
>  and comparator = 'UTF8Type'
>  and default_validation_class = 'CounterColumnType'
>  and key_validation_class = 'BytesType'
>  and rows_cached = 0.0
>  and row_cache_save_period = 0
>  and row_cache_keys_to_save = 2147483647
>  and keys_cached = 2000.0
>  and key_cache_save_period = 14400
>  and read_repair_chance = 1.0
>  and gc_grace = 864000
>  and min_compaction_threshold = 4
>  and max_compaction_threshold = 32
>  and replicate_on_write = true
>  and row_cache_provider = 'ConcurrentLinkedHashCacheProvider'
>  and compaction_strategy =
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy';
> 
> What would be the consequences of changing the key_validation_class
> from 'BytesType' to 'UTF8Type'  (in production)?
> 
> Shouldn't my assume command allow me to update my data even if I don't
> give the key as Bytes ?
> 
> Alain


Mime
View raw message