Question-: In Cassandra cluster you should initiate the repair command for? A. Adding or removing new nodes to the cluster. B. if node goes out of the cluster then using repair command you can bring it back in the cluster. C. using the repair command you can synchronize all the replicas in the Cassandra cluster. D. using repair command client can reconnect with the Cassandra cluster if connection is broken.
Answer: C Exp: There is a command “nodetool repair� in the Cassandra cluster. This has nothing to do with node living or joining the cluster. It is more of a synchronizing all the replicas distributed across the nodes in the cluster. All replica should have same data. And you can force that using the nodetool repair command.
Question-: You have set up a Cassandra cluster with nodes, three nodes in each datacenter. It was found that because of network disconnect for almost minutes one of the data center got disconnected. And you are worried that there were lot of write happening on the database during that time. What would you do in this case when network connectivity re-established?
A. You would execute it nodetool synchronize command. B. you would execute nodetool repair command. C. you would execute nodetool rejoin command D. you would execute nodetool reconnect command
Answer: B
Explanation: Whenever in Cassandra cluster if you see there were drops in the writing of the data in one of the node in cluster, which is having replication factor more than 1. You should run nodetool repair command. So that all the replicas can be synchronized.
Question-: In Cassandra cluster to repair dropped writes, which of the following data structure is used to compare the data between two nodes? A. B- tree B. Merkel tree C. Hashtable D. Log data structure
Answer: B
Explanation: You require repair in the Cassandra cluster when replicas across the nodes are not in sync. There could be multiple reason for this, like one of the nodes is offline for some time and got reconnected to the cluster. Similarly, there are some drops in the write of the data then also you need to initiate the repair. There is a command to initiate the repair using the nodetool which is “nodetool repair� command. When repair command is issued nodes create Markel trees from partition to represent how current data values are. Then this Merkel tree would be Exchange with another node from which data synchronization would be happening. Nodes will compare the Merkel trees to identify any specific value that needs to be synchronized between these two nodes. Once it is identified both the nodes exchange the data values and update their data.