Question-: You are having a Cassandra cluster with the “Single token architecture� and you have found that one of the nodes in the cluster is having issue and you need to remove that node from the cluster. What you would be doing? A. First manually adjust the tokens evenly, so that data can be distributed across the cluster on remaining nodes. B. Use the “nodetool assassinate� command C. Use the “nodetool removenode� command D. Use the “nodetool decommission� command E. Use the “nodetool rearrangetkn� command
Answer: A,C
Explanation: If node is already active then you should use the “nodetool decommission� command. But if node is down then we should use the “nodetool removenode� command. However, in the question it is clearly mentioned that it is a single token architecture. Hence, you have to manually arrange the token before running the removenode command. If even “nodetool removenode� command does not work, you have to use the “nodetool assassinate� command as a last resort. This command forcefully removes a dead node without re-replicating any data. When you use the removenode command, it shows the current status of the node as removal, and then forces the completion of the pending removal. This command should be used only when node is down or nodetool decommission command can not be used. Using this command triggers the cluster streaming. Within the large environments, the additional streaming activity causes more pending gossip tasks in the output of nodetool tpstats. Nodes can start to appear offline and might need to be restarted to clear up the backlog of pending gossip tasks.
Question-: Please map the following A. “nodetool decommission� B. “nodetool removenode� C. “nodetool assassinate�
Answer: A-1, B-2, C-3 Exp: This question is easy to answer if you know the usage of any two command. We can take a node out of the cluster with the “nodetool decommission� to a live node, or “nodetool removenode� to remove a dead one. Using this will assign the ranges from the old node was responsible for to other nodes, and replicate the appropriate data there. If decommission command is used, the data will stream from the decommission node. If removenode is used, the data will stream from the remaining replicas. However, remember that no data is removed automatically from the node being decommissioned, so if you want to put the node back into service as a different token on the ring, it should be removed manually.
Question-: You have node cluster, and you have found that one of the node in the cluster is performing badly. You decided to remove this node. Which of the below correct way of removing this node (Assume replication factor set as for this cluster)? A. As we know data is already replicated in the cluster. We simply tun-off the node and then remove it. B. You would be running “nodetool decommission� command C. You would be running “nodetool removenode� command D. You would be running “nodetool assassinate� command
Answer: B Exp: As you read the question, you can find that it is talking about remove the node which is badly performing. But this one is still online. And if you want bring down the node which is already alive, you should use “nodetool decommission� command. Because when you remove a node, token ranges need to adjusted on the remaining node. Hence, existing nodes are now responsible for handling more tokens , once token ranges are arranged then data would be streamed from this node(node which would be decommissioned) to the existing nodes. You will be using “removenode� command for the node which is already dead. So, you will go on another node in the cluster and then run the “removenode� command. But this is not the case, which is given in the question.