Skip to content

Commit

Permalink
[Feature][server]support one worker can belongs different worker grou…
Browse files Browse the repository at this point in the history
…ps when execute install script (#3307)
  • Loading branch information
lgcareer committed Jul 28, 2020
1 parent 88645de commit 6b964be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dolphinscheduler-server/src/main/resources/worker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
# worker listener port
#worker.listen.port: 1234

# default worker group
#worker.groups=default
# default worker group,if this worker belongs different groups,you can config the following like that `worker.groups=default,test`
worker.groups=default
9 changes: 7 additions & 2 deletions script/scp-hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ do
echo $workerGroup;
worker=`echo $workerGroup|awk -F':' '{print $1}'`
groupName=`echo $workerGroup|awk -F':' '{print $2}'`
workersGroupMap+=([$worker]=$groupName)
if [ -z ${workersGroupMap[$worker]} ];then
workersGroupMap+=([$worker]=$groupName)
else
finalGroupName="${workersGroupMap[$worker]},$groupName"
workersGroupMap[$worker]=$finalGroupName
fi
done


Expand All @@ -53,7 +58,7 @@ do
do
# if worker in workersGroupMap
if [[ "${workersGroupMap[${host}]}" ]] && [[ "${dsDir}" == "conf" ]]; then
sed -i ${txt} "s#worker.group.*#worker.group=${workersGroupMap[${host}]}#g" ${dsDir}/worker.properties
sed -i ${txt} "s#worker.groups.*#worker.groups=${workersGroupMap[${host}]}#g" ${dsDir}/worker.properties
fi

echo "start to scp $dsDir to $host/$installPath"
Expand Down

0 comments on commit 6b964be

Please sign in to comment.