Search code examples
cassandranodetool

Does nodetool for cassandra only gather data for a single node or for the entire cluster?


I have a 19-node Cassandra cluster for our internal service. If I log into a node using nodetool and run commands like tablestats, etc, does that gather stats just for that particular node or for the entire cluster?


Solution

  • nodetool utility for cassandra gather for entire cluster, not a single node. For example, if you run command like-

    command:

    nodetool tablestats musicdb.artist
    

    result:

    Keyspace: musicdb
    Read Count: 0
    Read Latency: NaN ms.
    Write Count: 0
    Write Latency: NaN ms.
    Pending Flushes: 0
        Table: artist
        SSTable count: 1
        Space used (live): 62073
        Space used (total): 62073
        Space used by snapshots (total): 0
        Off heap memory used (total): 1400
        SSTable Compression Ratio: 0.27975344141453456
        Number of keys (estimate): 1000
        Memtable cell count: 0
        Memtable data size: 0
        Memtable off heap memory used: 0
        Memtable switch count: 0
        Local read count: 0
        Local read latency: NaN ms
        Local write count: 0
        Local write latency: NaN ms
        Pending flushes: 0
        Bloom filter false positives: 0
        Bloom filter false ratio: 0.00000
        Bloom filter space used: 1264
        Bloom filter off heap memory used: 1256
        Index summary off heap memory used: 128
        Compression metadata off heap memory used: 16
        Compacted partition minimum bytes: 104
        Compacted partition maximum bytes: 149
        Compacted partition mean bytes: 149
        Average live cells per slice (last five minutes): 0.0
        Maximum live cells per slice (last five minutes): 0
        Average tombstones per slice (last five minutes): 0.0
        Maximum tombstones per slice (last five minutes): 0
    

    Status of the table artist belongs to keyspace musicdb above is from the entire cluster.