diff options
author | szepet <szepet95@gmail.com> | 2019-05-31 22:16:29 +0200 |
---|---|---|
committer | Andor Molnar <andor@apache.org> | 2019-05-31 22:16:29 +0200 |
commit | d3dbe787f37eb9e17402e4a3d55a441ca43b2160 (patch) | |
tree | d5ebaf3b44ba6d8493fe59a7df4296c74e7d6879 /bin/zkServer.sh | |
parent | ca4b12430ef579f67785146a195ebfed5ca73f39 (diff) | |
download | zookeeper-d3dbe787f37eb9e17402e4a3d55a441ca43b2160.tar.gz |
ZOOKEEPER-1426: add version command to the zookeeper server
Adding a version command to the zkServer.sh.
This is an open/unresolved issue, however, a really nice feature to have. The implementation is already provided by Eli Reisman on the issue page and got several +1 back then, but has not been committed. I just rebased the patch.
Author: szepet <szepet95@gmail.com>
Reviewers: eolivelli@apache.org, andor@apache.org
Closes #923 from szepet/ZOOKEEPER-1426 and squashes the following commits:
d9108bda1 [szepet] test-scripts.sh improved to work with ant build as well
cd6a0bf7d [szepet] ZOOKEEPER-1426: add version command to the zookeeper server
Diffstat (limited to 'bin/zkServer.sh')
-rwxr-xr-x | bin/zkServer.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/zkServer.sh b/bin/zkServer.sh index e4e01e86e..b83848a4a 100755 --- a/bin/zkServer.sh +++ b/bin/zkServer.sh @@ -216,6 +216,10 @@ stop) fi exit 0 ;; +version) + ZOOMAIN=org.apache.zookeeper.version.VersionInfoMain + $JAVA -cp "$CLASSPATH" $ZOOMAIN 2> /dev/null + ;; restart) shift "$0" stop ${@} @@ -272,6 +276,6 @@ status) fi ;; *) - echo "Usage: $0 [--config <conf-dir>] {start|start-foreground|stop|restart|status|print-cmd}" >&2 + echo "Usage: $0 [--config <conf-dir>] {start|start-foreground|stop|version|restart|status|print-cmd}" >&2 esac |