update worker group config (#2746)
* fix worker group config no effect * remove codehaus janino jar the license about janino maybe not compatiable with Apache v2 * Merge remote-tracking branch 'upstream/dev-1.3.0' into dev-1.3.0 # Conflicts: # dolphinscheduler-server/src/main/resources/config/install_config.conf * Update datasource.propertiesdev-1.3.0
parent
2700f8d87e
commit
b51c999552
|
|
@ -29,7 +29,6 @@
|
|||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<codehaus.janino.version>3.1.0</codehaus.janino.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
@ -589,10 +588,5 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>janino</artifactId>
|
||||
<version>${codehaus.janino.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/dolphinscheduler
|
|||
spring.datasource.username=test
|
||||
spring.datasource.password=test
|
||||
|
||||
# mysql
|
||||
# connection configuration
|
||||
#spring.datasource.initialSize=5
|
||||
# min connection number
|
||||
|
|
@ -61,4 +60,4 @@ spring.datasource.password=test
|
|||
|
||||
# open PSCache, specify count PSCache for every connection
|
||||
#spring.datasource.poolPreparedStatements=true
|
||||
#spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
|
||||
#spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
|
||||
|
|
|
|||
|
|
@ -26,6 +26,18 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
|||
txt="''"
|
||||
fi
|
||||
|
||||
declare -A workersGroupMap=()
|
||||
|
||||
workersGroup=(${workers//,/ })
|
||||
for workerGroup in ${workersGroup[@]}
|
||||
do
|
||||
echo $workerGroup;
|
||||
worker=`echo $workerGroup|awk -F':' '{print $1}'`
|
||||
groupName=`echo $workerGroup|awk -F':' '{print $2}'`
|
||||
workersGroupMap+=([$worker]=$groupName)
|
||||
done
|
||||
|
||||
|
||||
hostsArr=(${ips//,/ })
|
||||
for host in ${hostsArr[@]}
|
||||
do
|
||||
|
|
@ -39,9 +51,9 @@ do
|
|||
|
||||
for dsDir in bin conf lib script sql ui install.sh
|
||||
do
|
||||
# if worker in workersGroup
|
||||
if [[ "${workersGroup[${host}]}" ]] && [[ "${dsDir}" == "conf" ]]; then
|
||||
sed -i ${txt} "s#worker.group.*#worker.group=${workersGroup[${host}]}#g" ${dsDir}/worker.properties
|
||||
# if worker in workersGroupMap
|
||||
if [[ "${workersGroupMap[${host}]}" ]] && [[ "${dsDir}" == "conf" ]]; then
|
||||
sed -i ${txt} "s#worker.group.*#worker.group=${workersGroupMap[${host}]}#g" ${dsDir}/worker.properties
|
||||
fi
|
||||
|
||||
echo "start to scp $dsDir to $host/$installPath"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,17 @@ workDir=`dirname $0`
|
|||
workDir=`cd ${workDir};pwd`
|
||||
source $workDir/../conf/config/install_config.conf
|
||||
|
||||
declare -A workersGroupMap=()
|
||||
|
||||
workersGroup=(${workers//,/ })
|
||||
for workerGroup in ${workersGroup[@]}
|
||||
do
|
||||
echo $workerGroup;
|
||||
worker=`echo $workerGroup|awk -F':' '{print $1}'`
|
||||
groupName=`echo $workerGroup|awk -F':' '{print $2}'`
|
||||
workersGroupMap+=([$worker]=$groupName)
|
||||
done
|
||||
|
||||
mastersHost=(${masters//,/ })
|
||||
for master in ${mastersHost[@]}
|
||||
do
|
||||
|
|
@ -28,7 +39,7 @@ do
|
|||
|
||||
done
|
||||
|
||||
for worker in ${!workersGroup[*]}
|
||||
for worker in ${!workersGroupMap[*]}
|
||||
do
|
||||
echo "$worker worker server is starting"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,17 @@ workDir=`cd ${workDir};pwd`
|
|||
|
||||
source $workDir/../conf/config/install_config.conf
|
||||
|
||||
declare -A workersGroupMap=()
|
||||
|
||||
workersGroup=(${workers//,/ })
|
||||
for workerGroup in ${workersGroup[@]}
|
||||
do
|
||||
echo $workerGroup;
|
||||
worker=`echo $workerGroup|awk -F':' '{print $1}'`
|
||||
groupName=`echo $workerGroup|awk -F':' '{print $2}'`
|
||||
workersGroupMap+=([$worker]=$groupName)
|
||||
done
|
||||
|
||||
mastersHost=(${masters//,/ })
|
||||
for master in ${mastersHost[@]}
|
||||
do
|
||||
|
|
@ -29,7 +40,7 @@ do
|
|||
|
||||
done
|
||||
|
||||
for worker in ${!workersGroup[*]}
|
||||
for worker in ${!workersGroupMap[*]}
|
||||
do
|
||||
echo "$worker worker server is stopping"
|
||||
ssh -p $sshPort $worker "cd $installPath/; sh bin/dolphinscheduler-daemon.sh stop worker-server;"
|
||||
|
|
|
|||
Loading…
Reference in New Issue