如何完全清除,重置和重启Cassandra集群?

jim*_*rra 8 cassandra datastax-enterprise

我有一个旧的Cassandra集群需要恢复生机.我想清除所有用户和系统数据,所有存储的令牌,所有内容并从一个干净的平板开始 - 是否有推荐的方法这样做?

Jim*_*yer 12

这是我用于Apache Cassandra的过程:

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

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/>
Run Code Online (Sandbox Code Playgroud)

然后逐个重新启动节点上的Cassandra服务,首先从种子节点开始.在启动它们时,运行nodetool status以确保它们进入UN状态(Up Normal).

  • 如果这是旧群集,您可能还想升级. (2认同)