Reputation: 51
how would you tell if a table in Cassandra is active or not?
I have done some research and from what I see, it looks like you can only tell if a table is present or not in Cassandra.
But is there a way to tell if the table is active in Cassandra?
Upvotes: 2
Views: 35
Reputation: 57748
Alex is spot-on. Most enterprises use something like Prometheus or Grafana to visualize JMX metrics, and track reads or writes per second. That's an easy way to see if the table is active.
Otherwise, you can always run nodetool tablestats keyspace.table
. In the last 10 lines or so of the output, look for:
Average live cells per slice (last five minutes):
Maximum live cells per slice (last five minutes):
If you have any current read activity, these will be something other than zero or NaN (not a number).
Upvotes: 2
Reputation: 87069
For example, you can query different table-level metrics via JMX to see if specific table is used or not. You will need to detect changes between observations, maybe based on LiveDiskSpaceUsed
metric, or something like that.
Upvotes: 1