Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][server]support one worker can belongs different worker group when execute install script #3307

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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