Recently I've started working on Grails integration with Cassandra using the Java driver for cassandra(cassandra-driver-core-2.0.2). So I was curious to know how we can find out how much size our table is taking to store the data in cassandra DB.
I have created a keyspace with name Customkeyspace and a column family called Movie in it. So I was curious to know which tool/Command I have to use to know the size of the keyspace/Column family ?
If you need to know informaiton about table or tables you can use Nodetool cfstats command. Syntax: If you will only provide the name of keyspace, it will provide stats for all the tables in that keyspace.
A Cassandra column family consists of a collection of ordered columns in rows which represent a structured version of the stored data. The keyspace holds these Cassandra column families and each keyspace has at least one column family.
To get statistics regarding column families in Cassandra, you can simply run the command:
nodetool cfstats
It reports statistics about tables which include the live data size as well as on disk.
The documentation about this utility for Cassandra 2.1 is available here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With