cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamar Fraenkel <ta...@tok-media.com>
Subject Re: cli question
Date Mon, 05 Mar 2012 10:08:35 GMT
Thanks!
I decided to just replace all ":" with "^" and I can simply run:
get  a_b_indx ['AAA:BBB^CCC'];


*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

tamar@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956





On Mon, Mar 5, 2012 at 11:58 AM, Rishabh Agrawal <
rishabh.agrawal@impetus.co.in> wrote:

>  I faced the same issue some time back. Solution which fit my bill is as
> follows:
>
>
>
> CREATE COLUMN FAMILY aaa
>
>     with comparator = 'CompositeType(UTF8Type,UTF8Type)'
>
>     and default_validation_class = 'UTF8Type'
>
>     and key_validation_class =
> 'CompositeType(UTF8Type,UTF8Type,UTF8Type,)';
>
>
>
> notice I have mentioned three datatypes or validators in
> key_validation_class under CompositeType.
>
>
>
> Now if I have to insert with key aaa:bbb:ccc it will work smoothly and
> even if I wish to insert with just aaa:bbb it will work just fine.
>
>
>
> Do let me know if it solves your problem.
>
>
>
> Regards
>
> RIshabh Agrawal
>
>
>
>
>
> *From:* Tamar Fraenkel [mailto:tamar@tok-media.com]
> *Sent:* Monday, March 05, 2012 1:19 PM
> *To:* cassandra-user@incubator.apache.org
> *Subject:* cli question
>
>
>
> Hi!
> I have CF with the following deffinition:
>
>
>
> CREATE COLUMN FAMILY a_b_indx
>
>     with comparator = 'CompositeType(LongType,UUIDType)'
>
>     and default_validation_class = 'UTF8Type'
>
>     and key_validation_class = 'CompositeType(UTF8Type,UTF8Type)';
>
>
>
> Where the key may be a composite of the following two strings: 'AAA' and
> 'BBB:CCC'
>
> Notice, that the second string has ':' in it.
>
> I try to query for rows I know exist in the CF but can't.
>
> I tried those and many more :)
>
>    - get  a_b_indx ['AAA:BBB:CCC'];
>    - get  a_b_indx ['AAA:BBB\:CCC'];
>    - get  a_b_indx [utf8('AAA'):utf8('BBB:CCC')];
>
>
>
> Is it possible? Does anyone know how?
>
>
>
> Thanks,
>
>
>   *Tamar Fraenkel *
> Senior Software Engineer, TOK Media
>
> [image: Inline image 1]
>
>
> tamar@tok-media.com
> Tel:   +972 2 6409736
> Mob:  +972 54 8356490
> Fax:   +972 2 5612956
>
>
>
>
>
>
>
> ------------------------------
>
> Impetus’ Head of Innovation labs, Vineet Tyagi will be presenting on ‘Big
> Data Big Costs?’ at the Strata Conference, CA (Feb 28 - Mar 1)
> http://bit.ly/bSMWd7.
>
> Listen to our webcast ‘Hybrid Approach to Extend Web Apps to Tablets &
> Smartphones’ available at http://bit.ly/yQC1oD.
>
>
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
>

Mime
View raw message