You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/12/05 10:14:08 UTC
[dolphinscheduler] branch 2.0.1-prepare updated: [deploy] Recover host support multiply worker group (#7163)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch 2.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.1-prepare by this push:
new 17f8e18 [deploy] Recover host support multiply worker group (#7163)
17f8e18 is described below
commit 17f8e1879d463cedbd1412f5ba2237e070e6e1e7
Author: Jiajie Zhong <zh...@hotmail.com>
AuthorDate: Sun Dec 5 18:13:58 2021 +0800
[deploy] Recover host support multiply worker group (#7163)
---
script/scp-hosts.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/script/scp-hosts.sh b/script/scp-hosts.sh
index 161436c..6e24568 100755
--- a/script/scp-hosts.sh
+++ b/script/scp-hosts.sh
@@ -34,10 +34,14 @@ workersGroup=(${workers//,/ })
# shellcheck disable=SC2068
for workerGroup in ${workersGroup[@]}
do
- echo $workerGroup;
worker=`echo $workerGroup|awk -F':' '{print $1}'`
- groupsName=`echo $workerGroup|awk -F':' '{print $2}'`
- workersGroupMap+=([$worker]=$groupsName)
+ groupName=`echo $workerGroup|awk -F':' '{print $2}'`
+ if [ -z ${workersGroupMap[$worker]} ];then
+ workersGroupMap+=([$worker]=$groupName)
+ else
+ finalGroupName="${workersGroupMap[$worker]},$groupName"
+ workersGroupMap[$worker]=$finalGroupName
+ fi
done