incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thamizh <tceg...@yahoo.co.in>
Subject row key as long type
Date Thu, 08 Sep 2011 12:14:58 GMT
Hi All,

Is there a way to store number(longtype) as row key in Cassadra?

I wanted to execute range query based on row key value. e.g $list 
info[12345:]; . It should list all the rowkeys which are >= 12345. 


Is there a way accompolish this in cassandra? Secondary index does 
not helped me. So I am trying to store column value 'ip' as rowkey here.

data model:

create keyspace ipinfo with placement_strategy =
'org.apache.cassandra.locator.SimpleStrategy' and strategy_options =  
[{replication_factor:1}];

use rng;

create column family info with comparator = AsciiType
and key_validation_class = UTF8Type
and column_metadata =
[{
    column_name : domain,
    validation_class : UTF8Type,
    index_type : 0,
    index_name : domain_idx},
{
    column_name : ip,
    validation_class : LongType,
    index_type : 0,
    index_name : ip_idx
}];


Regards,

  Thamizhannal 

Mime
View raw message