1

To archive this using Cassendra Shell :

nodetool cfstats -- <keyspace>.<tablename>

Python Package - cassendra-driver

Docs - cassendra

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
abhinit21
  • 330
  • 1
  • 4
  • 13

2 Answers2

1

The metrics in nodetool tablestats (formerly cfstats) is not exposed to the drivers so you cannot get this information via CQL.

These metrics are only exposed via JMX. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
1

Actually, if you're running on Cassandra 4.0+, you can use Virtual Tables to achieve this:

SELECT * FROM system_views.disk_usage
WHERE keyspace_name='stackoverflow' AND table_name='baseball_stats';


 keyspace_name | table_name     | mebibytes
---------------+----------------+-----------
 stackoverflow | baseball_stats |         1

(1 rows)

I wrote an article on Virtual Tables early last month, if you'd like more information:

Leveraging Virtual Tables in Apache Cassandra 4.0

Aaron
  • 55,518
  • 11
  • 116
  • 132