O'Reilly logo

Mastering Apache Cassandra by Nishant Neeraj

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Replacing a node

Once in a while, a dead node needs to be replaced. This means you just wanted an exact replacement instead of just removal. Here are the steps:

  1. Note down the dead node's token.
  2. Set the new node's initial token as the dead node's token minus one. This node is going to own the new data, so you must make sure that the data directories are empty to avoid any conflict.
  3. Configure cassandra.yaml appropriately. Similar to the way we did when adding a new node. (Refer to the Adding nodes to a cluster section in this chapter.)
  4. Let the bootstrap complete and see the node appear in the nodetool ring listing.
  5. Perform a nodetool repair for each keyspace for integrity.
  6. Perform nodetool removetoken for the old node.

Let us see this in action. The example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required