hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Padilla <f...@alum.mit.edu>
Subject Re: zkCleanup.sh is buggy
Date Fri, 17 Jul 2009 18:59:47 GMT
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?

Mime
View raw message