ToastedBeans
ToastedBeans

Reputation: 51

Table in Cassandra

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

Answers (2)

Aaron
Aaron

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

Alex Ott
Alex Ott

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

Related Questions