@lifei
What you want is somehow a table with:
- Row key (partition key) = userId
- 1 point counter
- 1 log collection with as many log_timestamp as possible
It is indeed very easy to create a table like this:
CREATE TABLE logs
(
userId: int,
log_timestamp long, //timestamp
value text,
PRIMARY KEY (userId,log_timestamp)
);
It is a clustered entity (wide row) with a maximum of 2 billions of log_timestamp/value couples.
For the point counter, unfortunately you have to create another column family to store it because Cassandra does not allow mixing counter value with other types.