如何完全清除,重置和重新启动Cassandra集群? [英] How to completely clear down, reset and restart a Cassandra cluster?

查看:141
本文介绍了如何完全清除,重置和重新启动Cassandra集群?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧的Cassandra集群,需要恢复生活。我想清除所有的用户和系统数据,所有存储的令牌,一切,从一个干净的板块开始 - 是否有推荐的方式这样做?

I have an old Cassandra cluster that needs to be brought back into life. I would like to clear out all the user and system data, all stored tokens, everything and start from a clean slate - is there a recommended way of doing this?

推荐答案

这是我用于Apache Cassandra的过程:

Here's the procedure I use for Apache Cassandra:

首先在所有节点上停止Cassandra,然后在每个节点上停止:

First stop Cassandra on all the nodes, then on each node:

rm -r <the commitlog_directory specified in cassandra.yaml>
rm -r <the data_file_directories specified in cassandra.yaml>
rm <the contents of the saved_caches_directory specified in cassandra.yaml>
rm <old logfiles in /var/log/cassandra/>

然后在节点上逐个重新启动Cassandra服务,首先从种子节点开始。当你启动它们,运行nodetool状态,以确保他们进入状态UN(正常)。

Then restart the Cassandra service on the nodes one by one, starting with the seed nodes first. As you start them, run nodetool status to make sure they come up into state UN (Up Normal).

这篇关于如何完全清除,重置和重新启动Cassandra集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆