You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/01/14 20:52:01 UTC
[kudu] branch master updated: [docker] Adjust entrypoint variable
to be more composable
This is an automated email from the ASF dual-hosted git repository.
granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 12b907e [docker] Adjust entrypoint variable to be more composable
12b907e is described below
commit 12b907e5411913eb511d7df008c4e6697bdc58bb
Author: Grant Henke <gr...@apache.org>
AuthorDate: Thu Jan 9 08:51:14 2020 -0800
[docker] Adjust entrypoint variable to be more composable
Before this patch all flags needed to be provided in order to
provide any custom flags for `MASTER_ARGS` or
`TSERVER_ARGS`. Now any flag provided will override the
defaults by being appended to the passed gflags.
Change-Id: Ic3451b3bb2d398f8e0bdea881103b6d4a74cb753
Reviewed-on: http://gerrit.cloudera.org:8080/14993
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
docker/kudu-entrypoint.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docker/kudu-entrypoint.sh b/docker/kudu-entrypoint.sh
index 82cf6f9..26e19a3 100755
--- a/docker/kudu-entrypoint.sh
+++ b/docker/kudu-entrypoint.sh
@@ -58,8 +58,8 @@ DEFAULT_ARGS="--fs_wal_dir=$SERVICE_DIR \
--webserver_doc_root=/opt/kudu/www \
--stderrthreshold=0 \
--use_hybrid_clock=false"
-MASTER_ARGS=${MASTER_ARGS:="$DEFAULT_ARGS"}
-TSERVER_ARGS=${TSERVER_ARGS:="$DEFAULT_ARGS"}
+MASTER_ARGS=${MASTER_ARGS:=""}
+TSERVER_ARGS=${TSERVER_ARGS:=""}
# Wait until the master hosts can be resolved.
#
@@ -71,7 +71,7 @@ TSERVER_ARGS=${TSERVER_ARGS:="$DEFAULT_ARGS"}
# or fail on it's own.
function wait_for_master_hosts() {
IFS=","
- for HOST in "$KUDU_MASTERS"
+ for HOST in $KUDU_MASTERS
do
MAX_ATTEMPTS=5
ATTEMPTS=0
@@ -97,7 +97,7 @@ if [[ "$1" == "master" ]]; then
if [[ -n "$KUDU_MASTERS" ]]; then
MASTER_ARGS="--master_addresses=$KUDU_MASTERS $MASTER_ARGS"
fi
- exec kudu master run ${MASTER_ARGS}
+ exec kudu master run ${DEFAULT_ARGS} ${MASTER_ARGS}
elif [[ "$1" == "tserver" ]]; then
mkdir -p "$SERVICE_DIR"
wait_for_master_hosts
@@ -106,7 +106,7 @@ elif [[ "$1" == "tserver" ]]; then
else
TSERVER_ARGS="--tserver_master_addrs=localhost $TSERVER_ARGS"
fi
- exec kudu tserver run ${TSERVER_ARGS}
+ exec kudu tserver run ${DEFAULT_ARGS} ${TSERVER_ARGS}
elif [[ "$1" == "help" ]]; then
print_help
exit 0