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 getChildrenKeys(final String key) {