Apache Cassandra Maintenance Tasks
Edge for Private Cloud v. 4.17.01
The Apache Cassandra ring nodes require periodic maintenance to ensure consistency across all nodes. To perform this maintenance, use the Cassandra "nodetool -h localhost repair" command.
This maintenance must be run on every Cassandra node at least every seven days in order to eliminate problems related to Cassandra "forgotten deletes". Running "nodetool -h localhost repair " imposes a significant load on the system, so Apigee recommends that this process only be run during periods of relatively low workload.
You should also run the command on one Cassandra node at a time. You can run it on different nodes on different days, or schedule it so that there are several hours between running it on each node.
In a single-region or single-data-center Apigee installation, use the command "nodetool -h localhost repair " on one Cassandra node to ensure consistency across all nodes in the ring. In a multi-region or multi-data-center Apigee installation, use "nodetool -h localhost repair -pr" on every node in the ring (across all regions or data centers).
For more information on "forgotten deletes" and Cassandra consistency, and for instructions on how to use "nodetool", see:
Important Note: Apigee does not recommend adding, moving or removing Cassandra nodes without contacting Apigee Customer Success. The Apigee system tracks Cassandra nodes using their IP address, and performing ring maintenance without performing corresponding updates on the Apigee environment metadata will cause undesirable results.
Log File Maintenance
Cassandra logs are stored in the /<inst_root>/apigee/var/log/cassandra directory on each node. By default, a maximum of 50 log files, each with a maximum size of 20 MB, can be created; once this limit is reached older logs are deleted when newer logs are created.
If you should find that Cassandra log files are taking up excessive space, you can modify the amount of space allocated for log files by editing the log4j settings.
- Edit /<install_dir>/apigee/customer/application/cassandra.properties to set the following properties. If that file does not exist, create it:
conf_log4j-server_log4j.appender.r.maxfilesize=20MB # max file size
conf_log4j-server_log4j.appender.r.maxbackupindex=50 # max open files
- Restart Cassandra by using the commands:
$ /<install_dir>/apigee/apigee-service/bin/apigee-service apigee-cassandra restart
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Send Docs Feedback
(Incorrect? Unclear? Broken link? Typo?)