How to know the size of a keyspace and column family in Cassandra?

前端 未结 4 1424
情话喂你
情话喂你 2021-02-05 10:21

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 ou

4条回答
  •  长发绾君心
    2021-02-05 11:01

    To get the statistics regarding column families in Cassandra with respect to keyspaces or tables, you can simply run the below command:

    nodetool cfstats

    Result: This will return the complete statistics related to available keyspaces.

    But, in case you want to find out the statistics of specific keyspaces or tables, run below command:

    For Keyspace(s) : nodetool cfstats OR nodetool cfstats -H

    For Table(s) : nodetool tablestats . OR nodetool tablestats -H .

    Note: -H denotes Human Readable format

    For more details please refer, nodetool cfstats

    Findings:

    1. You might see SSTable count as 0

    2. Space used (live) and Space used (total) as 0 bytes

    To know WHY(s) of the above two findings please refer: Reason of why SSTable count shown as 0

提交回复
热议问题