Usage:
$ nodetool repair [-h | -p | -pw | -u] <flags> [ -- keyspace_name [table_name]]
Default Repair Option
$ nodetool repair
This command will repair the current node's primary token range (i.e. range which it owns) along with the replicas of other token ranges it has in all tables and all keyspaces on the current node:
For e.g. If you have replication factor of 3 then total of 5 nodes will be involved in repair: 2 nodes will be fixing 1 partition range 2 nodes will be fixing 2 partition ranges 1 node will be fixing 3 partition ranges. (Command was run on this node)
Repair in Parallel
$ nodetool repair -par
This command will run do perform the same task as default repair but by running the repair in parallel on the nodes containing replicas.
Repair Primary Token Range
This command repairs only the primary token range of the node in all tables and all keyspaces on the current node:
$ nodetool repair -pr
Repair only the local Data Center on which the node resides:
$ nodetool repair -pr -local
Repair only the primary range for all replicas in all tables and all keyspaces on the current node, only by streaming from the listed nodes:
$ nodetool repair -pr -hosts 192.168.0.2, 192.168.0.3, 192.168.0.4
Repair only the primary range for all replicas in the stackoverflow keyspace on the current node:
$ nodetool repair -pr -- stackoverflow
Repair only the primary range for all replicas in the test_users table of the stackoverflow keyspace on the current node:
$ nodetool repair -pr -- stackoverflow test_users