Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 871
Ste Avatar asked Feb 06 '18 05:02

Ste


2 Answers

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.

like image 140
Anower Perves Avatar answered Oct 18 '22 00:10

Anower Perves


Most nodetool commands operate on a single node in the cluster if -h is not used to identify one or more other nodes. If the node from which you issue the command is the intended target, you do not need the -h option to identify the target; otherwise, for remote invocation, identify the target node, or nodes, using -h.

Nodetool Utility

like image 33
undefined_variable Avatar answered Oct 18 '22 01:10

undefined_variable