如何彻底清除、重置和重启 Cassandra 集群? [英] How to completely clear down, reset and restart a Cassandra cluster?

查看:39
本文介绍了如何彻底清除、重置和重启 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 status 以确保它们进入状态 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天全站免登陆