简体   繁体   English

如何清除Cassandra中的所有数据?

[英]How do I wipe all out all the data in Cassandra?

While building a new datacenter, I accidentally have the new nodes join a current datacenter. 在构建新数据中心时,我不小心使新节点加入了当前数据中心。 I did a nodetool remove on those nodes. 我在这些节点上nodetool remove了一个nodetool remove What's the best way to delete/erase any data on those new nodes so I can start from scratch? 删除/擦除这些新节点上的任何数据的最佳方法是什么,以便我可以从头开始? Is doing a rm -rf /var/lib/cassandra/* enough to ensure my node in a clean state? 做一个rm -rf /var/lib/cassandra/*足以确保我的节点处于干净状态?

First you have to remove/decommission those nodes from current datacenter.Once it is finished successfully delete all the data files, saved_cache and commitlogs on same nodes. 首先您必须从当前数据中心删除/停用这些节点。完成后,请成功删除同一节点上的所有数据文件,saved_cache和commitlogs。 When you add them into new datacenter all your data,saved_cache and commitlog dir should be empty. 将它们添加到新数据中心时,所有数据,saved_cache和commitlog目录应为空。

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

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