diff --git a/dolphinscheduler-server/src/main/resources/config/install_config.conf b/dolphinscheduler-server/src/main/resources/config/install_config.conf index f6b09b9cb8..9a69306b2b 100644 --- a/dolphinscheduler-server/src/main/resources/config/install_config.conf +++ b/dolphinscheduler-server/src/main/resources/config/install_config.conf @@ -130,7 +130,7 @@ masters="ds1,ds2" # run worker machine # note: need to write the worker group name of each worker, the default value is "default" -workersGroup=(["ds1"]="default" ["ds2"]="default" ["ds3"]="default" ["ds4"]="default" ["ds5"]="default") +declare -A workersGroup=(["ds1"]="default" ["ds2"]="default" ["ds3"]="default" ["ds4"]="default" ["ds5"]="default") # run alert machine # note: list of machine hostnames for deploying alert server diff --git a/script/scp-hosts.sh b/script/scp-hosts.sh index adee7d76c7..da4f0d6cd5 100644 --- a/script/scp-hosts.sh +++ b/script/scp-hosts.sh @@ -40,8 +40,8 @@ do for dsDir in bin conf lib script sql ui install.sh do # if worker in workersGroup - if [[ "${map[${host}]}" ]] && [[ "${dsDir}" -eq "conf" ]]; then - sed -i ${txt} "s#worker.group.*#worker.group=${map[${host}]}#g" $workDir/../conf/worker.properties + if [[ "${workersGroup[${host}]}" ]] && [[ "${dsDir}" == "conf" ]]; then + sed -i ${txt} "s#worker.group.*#worker.group=${workersGroup[${host}]}#g" ${dsDir}/worker.properties fi echo "start to scp $dsDir to $host/$installPath"