Cassandra vnodes: can I lower the number on slower nodes and expect rebalancing to occur automatically?

后端 未结 2 1332
故里飘歌
故里飘歌 2021-01-15 22:35

I am running a small Cassandra 2.2.1 test cluster with 3 computers in it. Two of them are i7s and one is a somewhat slower i5, but I didn\'t bother when first setting things

2条回答
  •  太阳男子
    2021-01-15 23:11

    A simple restart won't allow you to change the number of vnodes.

    You'll need to do a nodetool decommission or nodetool removenode for the i5 node, then stop Cassandra on that node, scrub all the data, update num_tokens, then start Cassandra back up and let it rejoin the cluster as an empty new node with the reduced number of tokens. Then Cassandra will rebalance with the reduced number of tokens on the i5 box.

    At least that's how it is in 2.1.9, but probably it is the same in the newer branches too.

提交回复
热议问题