How to completely clear down, reset and restart a Cassandra cluster?
Asked Answered
M

1

12

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?

Marable answered 13/7, 2015 at 7:40 Comment(0)
P
17

Here's the procedure I use for Apache 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/>

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).

Polarization answered 13/7, 2015 at 12:17 Comment(1)
You probably also want to upgrade if this is an old cluster.Resistencia

© 2022 - 2024 — McMap. All rights reserved.