Question

Virtual node is a powerful setting in Cassandra which ease the burden of assigning proper initial token for each node, but sometimes I found it is a pain when reading its output of nodetool ring where each node is described by tons of lines. For example:

node-1  155         Up     Normal  228.55 KB       8.31%               7196378057413163154
node-1  155         Up     Normal  228.55 KB       8.31%               7215375135797395653
node-1  155         Up     Normal  228.55 KB       8.31%               7299851409832649823
node-1  155         Up     Normal  228.55 KB       8.31%               7361899028342316034
node-1  155         Up     Normal  228.55 KB       8.31%               7470359832465044920
node-1  155         Up     Normal  228.55 KB       8.31%               7631123206720404219
node-1  155         Up     Normal  228.55 KB       8.31%               7675034684873781539
node-1  155         Up     Normal  228.55 KB       8.31%               7871044212864174985
node-1  155         Up     Normal  228.55 KB       8.31%               7888407753199222932
node-1  155         Up     Normal  228.55 KB       8.31%               7916197345035903777
node-1  155         Up     Normal  228.55 KB       8.31%               7940203367286725631
node-1  155         Up     Normal  228.55 KB       8.31%               7981190016602200507
node-1  155         Up     Normal  228.55 KB       8.31%               8015518064513163806
node-1  155         Up     Normal  228.55 KB       8.31%               8018007479871405889
.....

If my goal is to just simply know which real node is up, and how much data each real node possesses, can I know how should I do it?

Was it helpful?

Solution

You should use nodetool status, which outputs just one line per node e.g.

$ bin/nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens  Owns   Host ID                               Rack
UN  127.0.0.1  152.64 KB  256     100.0%  22f70e40-4070-483a-9fa6-e272556b7164  rack1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top