I need to keep a count of handed out tokens per some cross concern view. Tokens are handed out by a master, and the count is per master, so I decided for the following CF setup using composite columns:
Usage = {
L0000001: {
(AAA, L0000001_0005_n1234_20120302_1): "2110-12-31T23:59:00+00:00"
(AAA, L0000001_0005_n1234_20120302_2): "2110-12-31T23:59:00+00:00"
(AAA, L0000001_0005_n1234_20120302_3): "2110-12-31T23:59:00+00:00"
...
(BBB, L0000001_0005_n1234_20120302_1): "2110-12-31T23:59:00+00:00"
(BBB, L0000001_0005_n1234_20120302_2): "2110-12-31T23:59:00+00:00"
(BBB, L0000001_0005_n1234_20120302_3): "2110-12-31T23:59:00+00:00"
...
}
'L0000001' is the master, 'AAA' and 'BBB' are the cross concern views. Because the write will be high, I decided to use time-to-live to have to columns automatically clean up.
What I now need is a way to count the number of living columns, so for for example L000001->AAA.
1. Since these are composite columns, I don't think I can define an index on the first part of a column.
2. CQL does not yet support composite columns, but if it does, then I cannot find a good example.
2. I can't find an example of how to do get_count using composite columns.
