cache_drive avatar image
cache_drive asked Erick Ramirez answered

How To Automate Cleanups & Repairs?

I have just been learning Cassandra from using my home lab w/ v3.x however the reason is I've been handed a very old v1.2 ring which is live in production (yes, I know!). From time to time, we (DBA team) have to do cleanups and repairs on the keySpaces. My questions is, how do you automate or simplify this process? It's a nightmare for the DBA. We have to SSH to each server, fire up a screen session because it takes so long, SSH will time out and finally run the command and wait until the prompt is returned to the bash shell and move on to the next node in the ring. Each node can take over 1hr time and we are scaling so as time goes on, this process becomes more unmanageable. Appreciate any and all suggestions on how to perform DBA maintenance that is smarter, not harder.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

@cache_drive as you know, Apache Cassandra 1.2 is no longer supported so your options are limited. Not sure what you mean by "cleanups". If you're running nodetool cleanup, could you provide some background info? It isn't normal for a DBA to perform that on a regular basis -- it's usually only done when you have changed the cluster topology (added a node for example).

As far as repairs are concerned, we generally recommend using the OpsCenter Repair Service. But since C* 1.2 is no longer supported, I would suggest running nodetool repair -pr one node a time (not parallel) and schedule it via cron once a week. For more details on the -pr flag, see the blog post Repair in Cassandra. Cheers!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.