Actually.. this is the patch I would suggest:

remove everything below and including the "eval", and change to:


ZOODATADIR=$(grep '^dataDir=' $ZOOCFG | sed -e 's/.*=//')
ZOODATALOGDIR=$(grep '^dataLogDir=' $ZOOCFG | sed -e 's/.*=//')

if [ "x${ZOODATALOGDIR}" = "x" ]
then
java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
     -cp $CLASSPATH $JVMFLAGS \
     org.apache.zookeeper.server.PurgeTxnLog $ZOODATADIR $*
else
java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
     -cp $CLASSPATH $JVMFLAGS \
     org.apache.zookeeper.server.PurgeTxnLog $ZOODATALOGDIR $ZOODATADIR $*
fi




Fernando Padilla wrote:
I am playing with the zookeeper 3.2.0 build, and it looks like the zkCleanup.sh script is a little buggy. :)

It calls:

PurgeTxnLog $dataDir

but doesn't pass through the count of snapshots.. you could do it simply by adding:

PurgeTxnLog $dataDir $*


Though I just realized, it only uses $dataDir, and is not smart enough to realize if it's using a different dataLogDir...

Should I file a bug?

Reply via email to