From 2e6312532eadb7c8a8501e82e929304699d74657 Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Fri, 26 Aug 2022 18:14:15 +0800 Subject: [PATCH] Fix heart beat task is not seconds --- .../server/master/registry/MasterRegistryClient.java | 2 +- .../server/worker/registry/WorkerRegistryClient.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java index ca5fac021..80cb059e5 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java @@ -186,7 +186,7 @@ public class MasterRegistryClient { void registry() { logger.info("Master node : {} registering to registry center", masterAddress); String localNodePath = getCurrentNodePath(); - long masterHeartbeatInterval = masterConfig.getHeartbeatInterval().toMillis(); + long masterHeartbeatInterval = masterConfig.getHeartbeatInterval().getSeconds(); HeartBeatTask heartBeatTask = new HeartBeatTask(startupTime, masterConfig.getMaxCpuLoadAvg(), masterConfig.getReservedMemory(), diff --git a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java index 11d18d574..b33b3ef0d 100644 --- a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java +++ b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java @@ -99,7 +99,7 @@ public class WorkerRegistryClient { public void registry() { String address = NetUtils.getAddr(workerConfig.getListenPort()); Set workerZkPaths = getWorkerZkPaths(); - long workerHeartbeatInterval = workerConfig.getHeartbeatInterval().toMillis(); + long workerHeartbeatInterval = workerConfig.getHeartbeatInterval().getSeconds(); HeartBeatTask heartBeatTask = new HeartBeatTask(startupTime, workerConfig.getMaxCpuLoadAvg(), -- GitLab