accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject [accumulo] branch 1.10 updated: Update tool.sh to set correct ZOOKEEPER_CMD. (#1716)
Date Mon, 28 Sep 2020 19:44:23 GMT
This is an automated email from the ASF dual-hosted git repository.

jmark99 pushed a commit to branch 1.10
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.10 by this push:
     new c21396d  Update tool.sh to set correct ZOOKEEPER_CMD. (#1716)
c21396d is described below

commit c21396d8226ca5d0ab5af96a9703e4b5bfdd44cc
Author: Mark Owens <jmark99@apache.org>
AuthorDate: Mon Sep 28 15:44:13 2020 -0400

    Update tool.sh to set correct ZOOKEEPER_CMD. (#1716)
    
    ZooKeeper changed directory structure between versions 3.4 and 3.5. This
    update sets the correct ZooKeeper depending upon version used.
    
    * Updated tool.sh to set correct ZOOKEEPER_CMD.
    
    * Added  suggested change to guarantee ZOOKEEPER_VERSION is defined. Also update to use
regex pattern checking for version.
    
    Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
---
 assemble/bin/tool.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/assemble/bin/tool.sh b/assemble/bin/tool.sh
index 1760c06..c3ed6ee 100755
--- a/assemble/bin/tool.sh
+++ b/assemble/bin/tool.sh
@@ -36,7 +36,11 @@ if [[ -z "$ZOOKEEPER_HOME" ]] ; then
    exit 1
 fi
 
-ZOOKEEPER_CMD='ls -1 $ZOOKEEPER_HOME/zookeeper-[0-9]*[^csn].jar '
+ZOOKEEPER_CMD='ls -1 $ZOOKEEPER_HOME/lib/zookeeper-[0-9]*[^csn].jar '
+ZOOKEEPER_VERSION=$(find -L "$ZOOKEEPER_HOME" -maxdepth 2 -name "zookeeper-[0-9]*.jar" |
head -1)
+if [[ $ZOOKEEPER_VERSION =~ ^3[.][01234].*$ ]]; then
+  ZOOKEEPER_CMD='ls -1 $ZOOKEEPER_HOME/zookeeper-[0-9]*[^csn].jar '
+fi
 if [[ $(eval $ZOOKEEPER_CMD | wc -l) -ne 1 ]] ; then
    echo "Not exactly one zookeeper jar in $ZOOKEEPER_HOME"
    exit 1


Mime
View raw message