There is a get_count() API function http://wiki.apache.org/cassandra/API , it's going to count the columns in a row or row+super column. This function is available in me.prettyprint.cassandra.service.KeyspaceService.
There are distributed counters submitted to the trunk http://wiki.apache.org/cassandra/Counters but these are not in the recent 0.7 release. I lost track of things over the holidays, perhaps someone else knows when these are scheduled to go public.
Aaron
On 13 Jan, 2011,at 09:12 AM, Michael Fortin <mi...@m410.us> wrote:
I was working on a schema that looks something like this:
HitFamily [UUID 1] ['user-agent'] = '…'
HitFamily [UUID 1] ['referer'] = '…'
HitFamily [UUID 1] ['client_id'] = Long
…
HitCountFamily [client_id as Long] [Current Date as Long] = UUID1
What I'd like to do is count the columns between a date rage without returning them. Is it possible to get a count of rows in a slice? Looking at hector and thrift there doesn't seem to be a way to do that. How have other handled this?
Thanks,