cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Heller <i...@zilence.net>
Subject Re: Columns limit
Date Sat, 07 Aug 2010 11:22:04 GMT
> Ok, I think the part I was missing was the concatenation of the key and
> partition to do the look ups. Is this the preferred way of accomplishing
> needs such as this? Are there alternatives ways?

Depending on your needs you can concat the row key or use super columns.

> How would one then "query" over multiple days? Same question for all days.
> Should I use range_slice or multiget_slice? And if its range_slice does that
> mean I need OrderPreservingPartitioner?

The last 3 days is pretty simple: ['2010-08-07', '2010-08-06',
'2010-08-05'], as is 7, 31, etc. Just generate the keys in your app
and use multiget_slice.

If you want to get all days where a specific ip address had some
requests you'll just need another CF where the row key is the addr and
column names are the days (values optional again). Pretty much the
same all over again, just add another CF and insert the data you need.

get_range_slice in my experience is better used for "offline" tasks
where you really want to process every row there is.

/thomas

Mime
View raw message