Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Zookeeper cleaner upper.
#!/usr/bin/env bash
##
# Useful reference and documentation material:
#
# https://zookeeper.apache.org/doc/r3.3.2/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup
set -o errexit
set -o pipefail
set -o nounset
cd /usr/share/zookeeper
. bin/zkEnv.sh
java -cp zookeeper-3.4.9.jar:$(find lib -name '*.jar' | tr '\n' ':'):conf org.apache.zookeeper.server.PurgeTxnLog /opt/zookeeper/log /opt/zookeeper/data -n 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment