incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tupshin Harper <tups...@tupshin.com>
Subject Re: How to keep only exactly column of key
Date Tue, 19 Jul 2011 07:04:09 GMT
Speaking from practical experience, it is possible to simulate this feature
by retrieving a slice of your row that only contains the most recent 100
items. You can then prevent the rows from growing out of control by checking
the size of the row and pruning it back to 100 every N writes, where N is
small enough to prevent excessive growth, but large enough to prevent
excessive overhead. A value of 50 or so for N worked reasonably well for me
for. If you do go down this path, though, keep in mind that rapid writes and
deletes to a single column are basically a Cassandra anti-pattern due to
performance problems with huge numbers of tombstones.

I would love to see a feature added similar to MongoDB's "capped
collections", but I don't believe there is any easy way to retrofit it into
Cassandra's sstable approach.
http://www.mongodb.org/display/DOCS/Capped+Collections

-Tupshin

On Mon, Jul 18, 2011 at 8:22 AM, JKnight JKnight <beuknight@gmail.com>wrote:

> Dear all,
>
> I want to keep only 100 column of a key: when I add a column for a key, if
> the number column of key is 100, another column (by order) will be deleted.
>
> Does Cassandra have setting for that?
>
> --
> Best regards,
> JKnight
>

Mime
View raw message