Question-156: If you are restoring a node from a backup and don't want to run bootstrap process, how can you do that?
Answer: First you need to know the reason why do you want to disable the bootstrap processing, usually the reason is when you are restoring a node from a backup or completely creating a new datacenter. Then you may not want to have a bootstrap process for the node which is being added. And to skip the bootstrapping process entirely and join the ring straight away by setting the hidden parameter “auto_bootstrap: false”.
Question-157: What are the possible ways to remove node out of the cluster?
Answer: It depends whether you want to remove a node which is a live for a dead. If you are removing a live node then you have to use “nodetool decommission” and if you are removing dead node then use “nodetool removenode” command.
Question-158: When you remove a node from the cluster, does it have data on it?
Answer: yes, when you remove a node by decommissioning from the Cassandra cluster then data is not removed automatically. If you want to put the node back into service at different token on the ring, then the data has to be cleaned at first from that node. Then only this node can be added back.
Question-159: is it possible that you can move node position in Cassandra cluster?
Answer: Yes, you can do that and that can be done using the “nodetool move” command. There is obviously an alternate approach where you can first decommission the node and then bootstrap it again but this approach is not that efficient. If position of the node has been changed in the cluster then use “nodetool cleanup” command to remove unnecessary data.
Question-160: How can you replace a dead node in the Cassandra cluster?
Answer: In order to replace a dead node, you have to start the Cassandra with the JVM start of flag “-Dcassandra.replace_address_first_boot=<IP address of dead node>”. Once this property is set the node starts in a Hibernate state, and all other nodes in the cluster see this node as down. But this node see itself as in UP state.
During the Hibernate state this new node will now start to Bootstrap the data from the rest of the nodes in the cluster, and it will only receive writes during the bootstrap phases, if it has a different IP address to the node that is being replaced.
Once the bootstrapping is completed this new node will be marked as “UP”. If you want to check the status of this replacement, you can use “nodetool netstats” command.
If you see replacement is taking a longer time based on the configure parameters then you can repair the node it can be made consistent.