Delete all Cassandra data?

I have 8 node cassandra settings. I save data with a 3 day TTL. But the data is useless after I do my resume (using my java script, number of things, etc.). I want to delete all data in a table. I can stop the cassandra for a while to do the removal. Thus, data is deleted from all nodes. Do I have to start truncating and restoring nodetool then or first clean up and then delete. What is the right way to do this.

+4
source share
1 answer

You can drop the tables or truncate them ... but keep in mind that Cassandra will downsize your tables by default, so you will also need to run nodetool clearsnapshot on all of your nodes. There is no need to stop Cassandra while you delete it.

I do not know that there is a correct path as such ... but when I do it, when I need to clear the table, firstly, I run truncate in the table using cqlsh. Then I run nodetool clearsnapshot on my nodes using pssh ( https://code.google.com/p/parallel-ssh/ ).

Hope this helps

+4
source

Source: https://habr.com/ru/post/1570548/


All Articles