When a node is added to a Cassandra cluster or an existing node is moved to a new position on the token ring, other systems still retain copies of data they are not responsible for. Nodetool cleanup removes data that does not belong on this node.
Use the IP and JMX port as arguments to nodetool
cleanup
.
$ <cassandra_home>/bin/nodetool -h 127.0.0.1 -p 8001 cleanup
Cleanup is a special type of compaction that removes data that does not belong on the node. Cleanup is intensive because it has to examine large portions of the data on disk.