Hi Fernando,
 Please do file a jira ( http://issues.apache.org/jira/browse/ZOOKEEPER )
and the patch below as an attachment to the created jira.

Here is how to contribute:
http://wiki.apache.org/hadoop/ZooKeeper/HowToContribute

 thnaks 
Mahadev


On 7/17/09 11:59 AM, "Fernando Padilla" <f...@alum.mit.edu> wrote:

> 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