You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sunit Randhawa <su...@gmail.com> on 2012/01/13 19:47:22 UTC
CLI command for adding composite Key
Hello,
Wondering how would one add Composite Keys rows using CLI. Supposing we
have CF defined below:
create column family ListTransactions
with comparator =
'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.IntegerType)'
and keys_cached=10000
and rows_cached=1000;
I am hoping to use the first column using a slice query on only the first
String component of composite column key. Since Cassandra orders composite
keys by components in each composite, we can construct a search range from
{"a", 1} to {"a", 59} which will include {"a", 1} and {"a", 59} but not
{"b", 22}.
Thanks,
Sunit.
Re: CLI command for adding composite Key
Posted by Jérémy SEVELLEC <js...@gmail.com>.
may be it's what you are looking for :
http://planetcassandra.org/posts?page=15
?
2012/1/13 Sunit Randhawa <su...@gmail.com>
> Hello,
>
> Wondering how would one add Composite Keys rows using CLI. Supposing we
> have CF defined below:
>
> create column family ListTransactions
> with comparator =
> 'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.IntegerType)'
>
> and keys_cached=10000
> and rows_cached=1000;
>
> I am hoping to use the first column using a slice query on only the first
> String component of composite column key. Since Cassandra orders composite
> keys by components in each composite, we can construct a search range from
> {"a", 1} to {"a", 59} which will include {"a", 1} and {"a", 59} but not
> {"b", 22}.
>
>
> Thanks,
>
> Sunit.
>
--
Jérémy