You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2023/09/01 07:22:04 UTC
[dolphinscheduler] 01/03: fix invalid registry path ends with 'master' or 'worker' (#14328)
This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch 3.2.0-release
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit fb792849e19c79fac667899ba03b124c8b1ff211
Author: Zinway <zi...@gmail.com>
AuthorDate: Fri Sep 1 15:11:49 2023 +0800
fix invalid registry path ends with 'master' or 'worker' (#14328)
Co-authored-by: Zinway Liu <zi...@ucloud.cn>
Co-authored-by: Aaron Wang <wa...@gmail.com>
(cherry picked from commit 96041e38766d1eb391812150fa15adc806ba2d4c)
---
.../java/org/apache/dolphinscheduler/registry/api/RegistryClient.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
index ddd80d94a1..f690b6800f 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
@@ -210,11 +210,11 @@ public class RegistryClient {
}
public boolean isMasterPath(String path) {
- return path != null && path.startsWith(RegistryNodeType.MASTER.getRegistryPath());
+ return path != null && path.startsWith(RegistryNodeType.MASTER.getRegistryPath() + Constants.SINGLE_SLASH);
}
public boolean isWorkerPath(String path) {
- return path != null && path.startsWith(RegistryNodeType.WORKER.getRegistryPath());
+ return path != null && path.startsWith(RegistryNodeType.WORKER.getRegistryPath() + Constants.SINGLE_SLASH);
}
public Collection<String> getChildrenKeys(final String key) {