Repeating time stamps in timers - Kassandra

I am going to use cassandra to store activity logs. I have something like this

CREATE TABLE general_actionlog (
   date text,
   time text,
   date_added timestamp,
   action text,
   PRIMARY KEY ((date,time),date_added)
);

I want to save all the activity for an hour in one line (= time in seconds. "Time" is only an hour of the day in the format H:00:00, ignoring minutes and seconds, so I have a line for each Y-m-d H:00:00)

The problem occurs when two actions occur at the same time stamp (for example, two pages in one second), so the second one overwrites the first.

How can I solve this problem in such a way that I can still request the use of slices?

thank

Mark

+4
source share
1 answer

timeuuid timestamp date_added. Timeuuid v1 UUID. ( ), .

+4

Source: https://habr.com/ru/post/1546182/


All Articles