cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Pierre <sebastien.pie...@gmail.com>
Subject Re: Cassandra to store logs as a list
Date Wed, 20 Jan 2010 21:44:32 GMT
Hmmm, but the only thing that is not clear is how I would store a lot of
values for the same key ? With redis, I was using keys like
"campaign:<campaign_id>:<YYYY><MM><DD>" to store a *list* of JSON-serialized
log info, and the list could scale to litteraly millions of entries. From my
understanding, Cassandra can only store 1 value per (colum key, field)
couple, doesn't it ?

 -- Sébastien

2010/1/20 Brandon Williams <driftx@gmail.com>

> 2010/1/20 Sébastien Pierre <sebastien.pierre@gmail.com>
>
>> Hi Mark,
>>
>> The most common query would be basically "get all the logs for this
>> particular day (and campaign)" or "get all the logs since this particular
>> time stamp (and campaign)", where everything would be aggregated by
>> "campaign id" (it's for an ad server).
>>
>> In this case, would using a key like the following improve balancing:
>> "campaign:<HEX_PADDED_CAMPAIGN_ID>:<NANOTIMESTAMP>" ? Also, if I add
a
>> prefix (like "campaign:<HEX_PADDED_CAMPAIGN_ID>:"), would the key have to
>> be UTF8Type instead of TimeUUIDType ?
>>
>
> If this is your only query, then you don't need an OPP and don't have to
> worry about balancing with the RandomPartitioner.  I would make the keys
> something between "campaign_id:<year>"  and
> "capaign_id:<year>:<month>:<day>:<hour>" depending on how much
volume you
> expect, so as not not overload a row.
>
> -Brandon
>

Mime
View raw message