Cassandra nodetool 命令查看每个节点中有多少数据

Cassandra nodetool command to see how much data lives in each node

我想知道每个 Cassandra 节点中的数据是否均匀分布。是否有一个 nodetool 命令可以让我概览哪个节点中存在多少数据。我只想确保数据均匀分布在所有这些 Cassandra 节点中,并且没有热点。

nodetool ring

将给出以下内容:

Datacenter: xxxx
==========
Address    Rack        Status State   Load            Owns                Token                                       
                                                                          3074457345618258602                         
127.0.0.1  rack1       Up     Normal  3.19 MiB        ?                   -9223372036854775808                        
127.0.0.2  rack1       Up     Normal  106.05 KiB      ?                   -3074457345618258603                        
127.0.0.3  rack1       Up     Normal  102.91 KiB      ?                   3074457345618258602                         

负载显示每个节点使用的文件存储量。它在 docs 中被描述为:

The amount of file system data under the cassandra data directory after excluding all content in the snapshots subdirectories. Because all SSTable data files are included, any data that is not cleaned up, such as TTL-expired cell or tombstoned data) is counted.