Database Reference
In-Depth Information
Ideally, performing repairs periodically is recommended to to keep clusters consist-
ent and in balanced states.
We can run the repair command as follows:
vivek@vivek-Vostro-3560:~/software/local-cluster/node4$
bin/nodetool repair -dc DC1
Running the preceding command triggers the repair process across multiple nodes
on data center DC1. Please note that repair is a memory-intensive process and requires
that you perform disk I/O to copy snapshots across replica nodes. We can also perform
the repair process in parallel using the -pr option, which initiates the repair process
across replica nodes and results in less downtime. We can also restrict the repair pro-
cess to nodes that are local to a data center like this:
vivek@vivek-Vostro-3560:~/software/local-cluster/node4$
bin/nodetool repair -local
rebuild
We perform the rebuild command whenever we add a new data center in a Cas-
sandra cluster and need to copy data from one data center to the newly added one. The
way to perform this command is
vivek@vivek-Vostro-3560:~/software/local-cluster/node4$
bin/nodetool rebuild - - DC2
Here DC2 is a new data center. Please make sure to include the newly added data
center, or the command will perform successfully but no data copy will happen.
rebuild_index
In Chapter 2 , we discussed that during schema changes, most often during Thrift and
CQL3 exchange, it is quite possible for a schema and the secondary indexes to be cor-
rupted. We can rebuild those indexes using the rebuild_index command:
Search WWH ::




Custom Search