Send Docs Feedback

Apache Zookeeper Maintenance Tasks

Edge for Private Cloud v. 4.16.09

Four-Letter Commands

Apache ZooKeeper has a number of "four-letter commands" that can be helpful in determining the current status of ZooKeeper voter and observer nodes.  These commands can be invoked using "nc", "telnet" or another utility that has the ability to send commands to a specific port.  Details on the four-letter commands can be found at:

http://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#sc_zkCommands.

Removing Old Snapshot Files

Apache ZooKeeper also requires periodic maintenance to remove old snapshot files which accumulate as updates to the system are made. You typically remove old snapshot files as part of a regular maintenance task or when you notice that free disk space is below a threshold.    

Instructions on how to clean up old snapshots can be found at 

http://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#sc_maintenance.

Log File Maintenance

Apache Zookeeper log files are kept in /<inst_root>/apigee/var/log/zookeeper. Normally, log file maintenance should not be required, but if you find that there are an excessive number of ZooKeeper logs or that the logs are very large you can modify ZooKeeper’s log4j properties to set the maximum file size and file count.  

  1. Edit /<install_dir>/apigee/customer/application/zookeeper.properties to set the following properties. If that file does not exist, create it:
    conf_log4j_log4j.appender.rollingfile.maxfilesize=10MB  # max file size
    conf_log4j_log4j.appender.rollingfile.maxbackupindex=50 # max open files
  2. Restart ZooKeeper by using the commands:
    $ /<install_dir>/apigee/apigee-service/bin/apigee-service apigee-zookeeper restart

Help or comments?