This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new fd4b59a [Improvement][Worker] Rename worker.weight to
worker.host.weight (#4997) (#5014)
fd4b59a is described below
commit fd4b59ad6c06cb8a558143e0ea16c6dd686b5c04
Author: wenjun <[email protected]>
AuthorDate: Wed Mar 10 08:55:04 2021 +0800
[Improvement][Worker] Rename worker.weight to worker.host.weight (#4997)
(#5014)
---
.../DOLPHIN/1.3.3/configuration/dolphin-worker.xml | 4 ++--
docker/build/README.md | 2 +-
docker/build/README_zh_CN.md | 2 +-
docker/build/conf/dolphinscheduler/worker.properties.tpl | 4 ++--
docker/build/startup-init-conf.sh | 2 +-
docker/docker-swarm/docker-compose.yml | 2 +-
docker/docker-swarm/docker-stack.yml | 2 +-
docker/kubernetes/dolphinscheduler/README.md | 2 +-
.../templates/configmap-dolphinscheduler-worker.yaml | 2 +-
.../templates/statefulset-dolphinscheduler-worker.yaml | 2 +-
docker/kubernetes/dolphinscheduler/values.yaml | 2 +-
.../dolphinscheduler/server/worker/config/WorkerConfig.java | 12 ++++++------
.../server/worker/registry/WorkerRegistry.java | 2 +-
dolphinscheduler-server/src/main/resources/worker.properties | 4 ++--
14 files changed, 22 insertions(+), 22 deletions(-)
diff --git
a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
index e5a3adf..aaa5463 100644
---
a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
+++
b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
@@ -67,12 +67,12 @@
<on-ambari-upgrade add="true"/>
</property>
<property>
- <name>worker.weigth</name>
+ <name>worker.host.weigth</name>
<value>100</value>
<value-attributes>
<type>int</type>
</value-attributes>
- <description>worker weight</description>
+ <description>worker host weight</description>
<on-ambari-upgrade add="true"/>
</property>
</configuration>
\ No newline at end of file
diff --git a/docker/build/README.md b/docker/build/README.md
index 6f168a3..69273f9 100644
--- a/docker/build/README.md
+++ b/docker/build/README.md
@@ -309,7 +309,7 @@ This environment variable sets port for `worker-server`.
The default value is `1
This environment variable sets groups for `worker-server`. The default value
is `default`.
-**`WORKER_WEIGHT`**
+**`WORKER_HOST_WEIGHT`**
This environment variable sets weight for `worker-server`. The default value
is `100`.
diff --git a/docker/build/README_zh_CN.md b/docker/build/README_zh_CN.md
index defb257..96bfb80 100644
--- a/docker/build/README_zh_CN.md
+++ b/docker/build/README_zh_CN.md
@@ -309,7 +309,7 @@ DolphinScheduler Docker 容器通过环境变量进行配置,缺省时将会
配置`worker-server`的分组,默认值 `default`。
-**`WORKER_WEIGHT`**
+**`WORKER_HOST_WEIGHT`**
配置`worker-server`的权重,默认之`100`。
diff --git a/docker/build/conf/dolphinscheduler/worker.properties.tpl
b/docker/build/conf/dolphinscheduler/worker.properties.tpl
index cab729b..ec0c4ab 100644
--- a/docker/build/conf/dolphinscheduler/worker.properties.tpl
+++ b/docker/build/conf/dolphinscheduler/worker.properties.tpl
@@ -33,8 +33,8 @@ worker.listen.port=${WORKER_LISTEN_PORT}
# default worker groups
worker.groups=${WORKER_GROUPS}
-# default worker weight
-worker.weight=${WORKER_WEIGHT}
+# default worker host weight
+worker.host.weight=${WORKER_HOST_WEIGHT}
# alert server listener host
alert.listen.host=${ALERT_LISTEN_HOST}
diff --git a/docker/build/startup-init-conf.sh
b/docker/build/startup-init-conf.sh
index 3d0eb4a..9549126 100755
--- a/docker/build/startup-init-conf.sh
+++ b/docker/build/startup-init-conf.sh
@@ -84,7 +84,7 @@ export WORKER_MAX_CPULOAD_AVG=${WORKER_MAX_CPULOAD_AVG:-"100"}
export WORKER_RESERVED_MEMORY=${WORKER_RESERVED_MEMORY:-"0.1"}
export WORKER_LISTEN_PORT=${WORKER_LISTEN_PORT:-"1234"}
export WORKER_GROUPS=${WORKER_GROUPS:-"default"}
-export WORKER_WEIGHT=${WORKER_WEIGHT:-"100"}
+export WORKER_HOST_WEIGHT=${WORKER_HOST_WEIGHT:-"100"}
export ALERT_LISTEN_HOST=${ALERT_LISTEN_HOST:-"127.0.0.1"}
#============================================================================
diff --git a/docker/docker-swarm/docker-compose.yml
b/docker/docker-swarm/docker-compose.yml
index b4c97cb..e860170 100644
--- a/docker/docker-swarm/docker-compose.yml
+++ b/docker/docker-swarm/docker-compose.yml
@@ -171,7 +171,7 @@ services:
WORKER_MAX_CPULOAD_AVG: "100"
WORKER_RESERVED_MEMORY: "0.1"
WORKER_GROUPS: "default"
- WORKER_WEIGHT: "100"
+ WORKER_HOST_WEIGHT: "100"
ALERT_LISTEN_HOST: dolphinscheduler-alert
HADOOP_HOME: "/opt/soft/hadoop"
HADOOP_CONF_DIR: "/opt/soft/hadoop/etc/hadoop"
diff --git a/docker/docker-swarm/docker-stack.yml
b/docker/docker-swarm/docker-stack.yml
index fddf279..094890d 100644
--- a/docker/docker-swarm/docker-stack.yml
+++ b/docker/docker-swarm/docker-stack.yml
@@ -165,7 +165,7 @@ services:
WORKER_MAX_CPULOAD_AVG: "100"
WORKER_RESERVED_MEMORY: "0.1"
WORKER_GROUPS: "default"
- WORKER_WEIGHT: "100"
+ WORKER_HOST_WEIGHT: "100"
ALERT_LISTEN_HOST: dolphinscheduler-alert
HADOOP_HOME: "/opt/soft/hadoop"
HADOOP_CONF_DIR: "/opt/soft/hadoop/etc/hadoop"
diff --git a/docker/kubernetes/dolphinscheduler/README.md
b/docker/kubernetes/dolphinscheduler/README.md
index 87b04ef..a6f474a 100644
--- a/docker/kubernetes/dolphinscheduler/README.md
+++ b/docker/kubernetes/dolphinscheduler/README.md
@@ -173,7 +173,7 @@ The Configuration file is `values.yaml`, and the following
tables lists the conf
| `worker.configmap.WORKER_RESERVED_MEMORY`
| Only larger than reserved memory, worker server can work. default value
: physical memory * 1/10, unit is G | `0.1`
|
| `worker.configmap.WORKER_LISTEN_PORT`
| Worker listen port
| `1234`
|
| `worker.configmap.WORKER_GROUPS`
| Worker groups
| `default`
|
-| `worker.configmap.WORKER_WEIGHT`
| Worker weight
| `100`
|
+| `worker.configmap.WORKER_HOST_WEIGHT`
| Worker host weight
| `100`
|
| `worker.livenessProbe.enabled`
| Turn on and off liveness probe
| `true`
|
| `worker.livenessProbe.initialDelaySeconds`
| Delay before liveness probe is initiated
| `30`
|
| `worker.livenessProbe.periodSeconds`
| How often to perform the probe
| `30`
|
diff --git
a/docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml
b/docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml
index 2b6a366..61d208e 100644
---
a/docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml
+++
b/docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml
@@ -31,5 +31,5 @@ data:
WORKER_RESERVED_MEMORY: {{ .Values.worker.configmap.WORKER_RESERVED_MEMORY |
quote }}
WORKER_LISTEN_PORT: {{ .Values.worker.configmap.WORKER_LISTEN_PORT | quote }}
WORKER_GROUPS: {{ .Values.worker.configmap.WORKER_GROUPS | quote }}
- WORKER_WEIGHT: {{ .Values.worker.configmap.WORKER_WEIGHT | quote }}
+ WORKER_HOST_WEIGHT: {{ .Values.worker.configmap.WORKER_HOST_WEIGHT | quote }}
{{- end }}
\ No newline at end of file
diff --git
a/docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
b/docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
index 271aaa1..d616b54 100644
---
a/docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
+++
b/docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
@@ -111,7 +111,7 @@ spec:
valueFrom:
configMapKeyRef:
name: {{ include "dolphinscheduler.fullname" . }}-worker
- key: WORKER_WEIGHT
+ key: WORKER_HOST_WEIGHT
- name: DOLPHINSCHEDULER_DATA_BASEDIR_PATH
valueFrom:
configMapKeyRef:
diff --git a/docker/kubernetes/dolphinscheduler/values.yaml
b/docker/kubernetes/dolphinscheduler/values.yaml
index a890259..896ae77 100644
--- a/docker/kubernetes/dolphinscheduler/values.yaml
+++ b/docker/kubernetes/dolphinscheduler/values.yaml
@@ -203,7 +203,7 @@ worker:
WORKER_RESERVED_MEMORY: "0.1"
WORKER_LISTEN_PORT: "1234"
WORKER_GROUPS: "default"
- WORKER_WEIGHT: "100"
+ WORKER_HOST_WEIGHT: "100"
## Periodic probe of container liveness. Container will be restarted if the
probe fails. Cannot be updated.
## More info:
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
livenessProbe:
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java
index a32d4c8..228f6ab 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java
@@ -50,8 +50,8 @@ public class WorkerConfig {
@Value("${worker.listen.port: 1234}")
private int listenPort;
- @Value("${worker.weight:100}")
- private int weight;
+ @Value("${worker.host.weight:100}")
+ private int hostWeight;
@Value("${alert.listen.host:localhost}")
private String alertListenHost;
@@ -115,12 +115,12 @@ public class WorkerConfig {
this.workerMaxCpuloadAvg = workerMaxCpuloadAvg;
}
- public int getWeight() {
- return weight;
+ public int getHostWeight() {
+ return hostWeight;
}
- public void setWeight(int weight) {
- this.weight = weight;
+ public void setHostWeight(int weight) {
+ this.hostWeight = weight;
}
public String getAlertListenHost() {
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistry.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistry.java
index b763497..87c6af6 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistry.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistry.java
@@ -152,7 +152,7 @@ public class WorkerRegistry {
String address = getLocalAddress();
String workerZkPathPrefix =
this.zookeeperRegistryCenter.getWorkerPath();
- int weight = workerConfig.getWeight();
+ int weight = workerConfig.getHostWeight();
long workerStartTime = System.currentTimeMillis();
for (String workGroup : this.workerGroups) {
diff --git a/dolphinscheduler-server/src/main/resources/worker.properties
b/dolphinscheduler-server/src/main/resources/worker.properties
index fd249e2..7fd11fe 100644
--- a/dolphinscheduler-server/src/main/resources/worker.properties
+++ b/dolphinscheduler-server/src/main/resources/worker.properties
@@ -33,8 +33,8 @@
# default worker groups
#worker.groups=default
-# default worker weight
-#worker.weight=100
+# default worker host weight
+#worker.host.weight=100
# alert server listener host
alert.listen.host=localhost