Database Reference
In-Depth Information
Managing administration with nodetool
We have seen some usage of nodetool while setting up the Cassandra cluster in Chapter
4 , Deploying a Cluster , and during various maintenance tasks in Chapter 6 , Managing a
Cluster - Scaling, Node Repair, and Backup . We will see more on the use of administrative
tools in this section.
drain
The drain command forces the node to stop listening to other nodes and clients. It flushes
all the data to SSTables. No more write commands are processed. This is a handy tool if
you want to safely shutdown Cassandra to upgrade it. The following is an example where
we'll check the status of a cluster, drain a node, and recheck the status:
# Drain the data to SSTables
$ bin/nodetool status
Datacenter: us-east
===================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host
ID Rack
UN 10.10.21.228 5.36 GB 256 23.8% fcc... 1a
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
UN 10.10.21.7 3.81 GB 256 23.9% 354... 1a
$ bin/nodetool -h cassandra01.naishe.in drain
$ bin/nodetool status
Datacenter: us-east
===================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host
ID Rack
UN 10.10.21.228 5.36 GB 256 23.8% fcc... 1a
Search WWH ::




Custom Search