What’s New in Cassandra 0.8, Part 2: Counters
The text discusses the introduction of distributed counters in Cassandra 0.8.0, which allows for efficient counting and summing operations. Prior to this version, there was no simple way to count or sum things in Cassandra. The new feature provides atomic increment operation in a single column value without any of the problems associated with previous solutions. To create a column family holding counters, users need to indicate that the default_validation_class is CounterColumnType. Using counters involves straightforward operations such as incr, decr, and get. The support for counters in CQL was added for the 0.8.1 release. However, counter increments are slightly slower than regular writes due to the read operation involved in replication. Additionally, handling the loss of an SSTable for a counter column family requires removing all data for that column family and restarting the node with specific options before running repair.
Company
DataStax
Date published
June 17, 2011
Author(s)
Sylvain Lebresne
Word count
760
Hacker News points
None found.
Language
English