GitHub user gnuhpc opened a pull request:

    https://github.com/apache/zookeeper/pull/63

    Solve variable in zkCleanup.sh  contains whitespace in its tail

    it solved a stupid, however, sometimes annoying question, that is the 
variable ZOODATADIR or ZOODATALOGDIR contains whitespace in its tail. Senario 
and tested as below:
    
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> bin/zkCleanup.sh -n 20
    Path '/hadoop/zookeeper/logs ' does not exist. 
    Usage:
    PurgeTxnLog dataLogDir [snapDir] -n count
    dataLogDir -- path to the txn log directory
    snapDir -- path to the snapshot directory
    count -- the number of old snaps/logs you want to keep, value should be 
greater than or equal to 3
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> vim bin/zkCleanup.sh 
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> cat bin/zkCleanup.sh |grep 
ZOODATALOGDIR |grep sed
    ZOODATALOGDIR="$(grep "^[[:space:]]dataLogDir=" "$ZOOCFG" | sed -e 's/.=//' 
| sed -e 's/[[:space:]]*$//')"
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> bin/zkCleanup.sh -n 20
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gnuhpc/zookeeper trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/63.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #63
    
----
commit 0a30b3c2f4ef537e3277e1743f28e2309d19646b
Author: Pengcheng Huang <[email protected]>
Date:   2016-04-11T13:24:17Z

    Update zkCleanup.sh
    
    it solved a stupid, however, sometimes annoying question, that is the 
variable ZOODATADIR or ZOODATALOGDIR contains whitespace in its tail. Senario 
and tested as below:
    
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> bin/zkCleanup.sh -n 20
    Path '/hadoop/zookeeper/logs ' does not exist. 
    Usage:
    PurgeTxnLog dataLogDir [snapDir] -n count
        dataLogDir -- path to the txn log directory
        snapDir -- path to the snapshot directory
        count -- the number of old snaps/logs you want to keep, value should be 
greater than or equal to 3
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> vim bin/zkCleanup.sh 
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> cat bin/zkCleanup.sh |grep 
ZOODATALOGDIR |grep sed
    ZOODATALOGDIR="$(grep "^[[:space:]]*dataLogDir=" "$ZOOCFG" | sed -e 
's/.*=//' | sed -e 's/[[:space:]]*$//')"
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8> bin/zkCleanup.sh -n 20
    hadoop@DPFTMP06:/usr/local/zookeeper-3.4.8>

commit 0f86262396bfe899388754448ceafe569109774c
Author: Pengcheng Huang <[email protected]>
Date:   2016-04-12T02:58:05Z

    Merge pull request #1 from gnuhpc/gnuhpc-patch-1
    
    Update zkCleanup.sh

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to