Apache Cassandra Maintenance Tasks

Edge for Private Cloud v. 4.17.01

Anti-Entropy Maintenance

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.

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:

http://wiki.apache.org/cassandra/Operations - Consistency

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 /opt/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.

  1. Edit /opt/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
  2. Restart Cassandra by using the commands:
    $ /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restart