未验证 提交 6b964be6 编写于 作者: L lgcareer 提交者: GitHub

[Feature][server]support one worker can belongs different worker groups when...

[Feature][server]support one worker can belongs different worker groups when execute install script (#3307)
上级 88645dea
...@@ -30,5 +30,5 @@ ...@@ -30,5 +30,5 @@
# worker listener port # worker listener port
#worker.listen.port: 1234 #worker.listen.port: 1234
# default worker group # default worker group,if this worker belongs different groups,you can config the following like that `worker.groups=default,test`
#worker.groups=default worker.groups=default
...@@ -34,7 +34,12 @@ do ...@@ -34,7 +34,12 @@ do
echo $workerGroup; echo $workerGroup;
worker=`echo $workerGroup|awk -F':' '{print $1}'` worker=`echo $workerGroup|awk -F':' '{print $1}'`
groupName=`echo $workerGroup|awk -F':' '{print $2}'` 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 done
...@@ -53,7 +58,7 @@ do ...@@ -53,7 +58,7 @@ do
do do
# if worker in workersGroupMap # if worker in workersGroupMap
if [[ "${workersGroupMap[${host}]}" ]] && [[ "${dsDir}" == "conf" ]]; then 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 fi
echo "start to scp $dsDir to $host/$installPath" echo "start to scp $dsDir to $host/$installPath"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册