kezhenxu94 commented on code in PR #13865:
URL: 
https://github.com/apache/dolphinscheduler/pull/13865#discussion_r1157020186


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java:
##########
@@ -98,6 +103,15 @@ private void registry() {
         log.info("Worker node: {} registry finished", 
workerConfig.getWorkerAddress());
     }
 
+    public Host getAlertServerAddress() {

Review Comment:
   What about returning an `Optional<Host>` here?



##########
dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/enums/RegistryNodeType.java:
##########
@@ -15,32 +15,33 @@
  * limitations under the License.
  */
 
-package org.apache.dolphinscheduler.alert;
+package org.apache.dolphinscheduler.registry.api.enums;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
+public enum RegistryNodeType {
 
-@Component
-@ConfigurationProperties("alert")
-public final class AlertConfig {
+    ALL_SERVERS("nodes", "/nodes"),
+    MASTER("Master", "/nodes/master"),
+    MASTER_NODE_LOCK("MasterNodeLock", "/lock/master-node"),
+    MASTER_FAILOVER_LOCK("MasterFailoverLock", "/lock/master-failover"),
+    WORKER("Worker", "/nodes/worker"),
+    ALERT_SERVER("AlertServer", "/nodes/alert-server"),
+    ALERT_LOCK("AlertNodeLock", "/lock/alert"),
+    ;
 
-    private int port;
+    private final String name;
+    private final String registryPath;
 
-    private int waitTimeout;
-
-    public int getPort() {
-        return port;
+    RegistryNodeType(String name, String registryPath) {
+        this.name = name;
+        this.registryPath = registryPath;
     }
 
-    public void setPort(final int port) {
-        this.port = port;
+    public String getName() {
+        return name;
     }
 
-    public int getWaitTimeout() {
-        return waitTimeout;
+    public String getRegistryPath() {

Review Comment:
   Let's use Lombok to simplify these methods 



##########
dolphinscheduler-standalone-server/src/main/resources/application.yaml:
##########
@@ -164,22 +164,17 @@ worker:
   #Scenes to be used for distributed users.For example,users created by 
FreeIpa are stored in LDAP.This parameter only applies to Linux, When this 
parameter is true, worker.tenant.auto.create has no effect and will not 
automatically create tenants.
   tenant-distributed-user: false
   # worker max cpuload avg, only higher than the system cpu load average, 
worker server can be dispatched tasks. default value -1: the number of cpu 
cores * 2
-  max-cpu-load-avg: -1
+  max-cpu-load-avg: 80
   # worker reserved memory, only lower than system available memory, worker 
server can be dispatched tasks. default value 0.3, the unit is G
-  reserved-memory: 0.3
-  # default worker groups separated by comma, like 'worker.groups=default,test'
-  groups:
-    - default
-  # alert server listen host
-  alert-listen-host: localhost
-  alert-listen-port: 50052

Review Comment:
   Can you review these changed configurations in the Helm Chart and see 
whether we have these there, if so remove them as well?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to