简体   繁体   English

Cassandra - 从群集中删除节点

[英]Cassandra - Removing a node from the cluster

I have a cluster with three nodes and I need to remove one node. 我有一个有三个节点的集群,我需要删除一个节点。 How can I make sure the data from the node to be removed will be replicated to the two other nodes before I actually remove it? 在实际删除之前,如何确保要删除的节点中的数据是否会复制到其他两个节点? Is this done using snapshots? 这是使用快照完成的吗? How should I proceed? 我该怎么办?

From the doc 来自doc

You can take a node out of the cluster with nodetool decommission to a live node, or nodetool removenode (to any other machine) to remove a dead one. 您可以将具有nodetool decommission的节点从群集中nodetool decommission到活动节点,或者将nodetool removenode (到任何其他计算机)移除以删除死亡节点。 This will assign the ranges the old node was responsible for to other nodes, and replicate the appropriate data there. 这会将旧节点负责的范围分配给其他节点,并在那里复制适当的数据。 If decommission is used, the data will stream from the decommissioned node. 如果使用退役,则数据将从退役节点流式传输。 If removenode is used, the data will stream from the remaining replicas. 如果使用removenode,数据将从剩余的副本流中传输。

You want to run nodetool decommission on the node you want to remove. 您希望在要删除的节点上运行nodetool decommission This will cause the node to stream all its data to the other nodes and then remove itself from the ring. 这将导致节点将其所有数据流式传输到其他节点,然后将其从环中移除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM