cassandra删除所有数据,重置为初始状态——删除<data dir>/data/* <data dir>/commitlog/* <data dir>/saved_caches/* 重启cassandra即可

简介:

Are you looking for a method other than drop keyspace?

Okay based on your clarification...

I would say the best way to reset cassandra would be to delete the contents of the <data dir>/data/* <data dir>/commitlog/* <data dir>/saved_caches/*

and then restart the services on the nodes beginning with the seed node and continuing with a 2 minute gap between each node start. That will take the nodes back to a clean state with respect to the data but leave the customizations in cassandra.yaml intact. This would also reset any changes made to the "system" keyspaces at the cqlsh level such as changing a replication factor.

 

见:http://stackoverflow.com/questions/20784714/drop-all-keyspaces-in-cassandra
















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6728542.html,如需转载请自行联系原作者




相关文章
|
Linux
HDFS文件上传异常分析:put: `test.txt': No such file or directory
HDFS文件上传异常分析:put: `test.txt': No such file or directory
7717 0
HDFS文件上传异常分析:put: `test.txt': No such file or directory
|
5月前
|
分布式计算 DataWorks 数据库连接
DataWorks操作报错合集之同步脚本报错This error often occurs when a lot dirty data exists in the source data. 是什么原因
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
|
Docker Windows 容器
在Docker中的Neo4j导入CSV文件报错:Couldn‘t load the external resource at: file:/...解决办法
在Docker中的Neo4j导入CSV文件报错:Couldn‘t load the external resource at: file:/...解决办法
658 0
在Docker中的Neo4j导入CSV文件报错:Couldn‘t load the external resource at: file:/...解决办法
|
分布式计算 安全 Hadoop
hdfs mkdir报错Cannot create directory /usr. Name node is in safe mode.
hdfs mkdir报错Cannot create directory /usr. Name node is in safe mode.
392 0
|
关系型数据库 MySQL 数据库
MySQL:load data local infile快速插入大批量数据
MySQL:load data local infile快速插入大批量数据
527 0
|
安全 NoSQL MongoDB
【安装MongoDB报错】mkdir: /data/db: Read-only file system
在安装MongoDB时,需要创建一个/data/db文件夹用来作为默认数据库目录。 但是因为Mac电脑默认是开启安全模式的,不能在根目录下面随便创建删除文件夹。所以我们创建的时候,会报这个错误mkdir: /data/db: Read-only file system,
696 0
|
NoSQL Java Redis
Redis集群:./redis-trib.rb:24:in `require': no such file to load -- rubygems
Redis集群:./redis-trib.rb:24:in `require': no such file to load -- rubygems
131 0
Node 更新失败:cp cannot stat ‘usrlocalnversionsnode12
Node 更新失败:cp cannot stat ‘usrlocalnversionsnode12
168 0