Database Reference
In-Depth Information
UN 10.10.21.206 4.98 GB 256 28.6% a81... 1a
UN 10.10.21.169 5.24 GB 256 23.7% 6ae... 1a
DN 10.10.21.7 3.8 GB 256 23.9% 354... 1a
$ bin/cqlsh cassandra01.naishe.in
Connection error: ('Unable to connect to any servers',
{'cassandra01.naishe.in': error(111, 'ECONNREFUSED')})
decommission
We have seen
decommission
during node removal in the
Removing nodes from a
earlier. Decommissioning is a way to remove a live node from the cluster. It streams all
the data that it has to a replica node or a node that will be responsible for the data after the
node that is being decommissioned dies.
removenode
To remove a dead node from the ring, use
removenode
. The
removenode
command
has three options:
nodetool -h <hostname> removenode <node_UUID>
nodetool -h <hostname> removenode status
nodetool -h <hostname> removenode force
The first removes the mentioned node (one can obtain the node
uuid
from the
node-
tool
status command), the second checks the status of the removal process, and the third
command forces finalization of any pending node removal.
The
removenode
command works on a dead node where decommissioning cannot func-
tion but, if the node is alive, decommissioning is the right technique.
move
The
move
command makes more sense for a cluster that does not use a vnode and you
need to balance the cluster manually. In a single-node-per-machine setup, decommission-
ing or adding a new node usually causes imbalance in the cluster. To reassign a different
token ID to a node, you need to execute the following command:
$ bin/nodetool -h NODE_IP_TO_CHANGE_TOKEN move NEW_TOKEN