From 0b7b6d4e2a600bb3af36363c4814da6b169317bf Mon Sep 17 00:00:00 2001 From: XiaotaoYi Date: Tue, 18 Aug 2020 07:09:39 +0800 Subject: [PATCH] =?UTF-8?q?[bug-3480][server]fix=20ds=20muti-level=20direc?= =?UTF-8?q?tory=20in=20zk,=20which=20lead=20to=20fa=E2=80=A6=20(#3532)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bug-3480][server]fix ds muti-level directory in zk, which lead to fail to assign work * miss whitespace for if statement --- .../server/registry/ZookeeperNodeManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java index f039fb5532..b1a5edee38 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java @@ -151,10 +151,10 @@ public class ZookeeperNodeManager implements InitializingBean { private String parseGroup(String path){ String[] parts = path.split("\\/"); - if(parts.length != 6){ + if (parts.length < 6) { throw new IllegalArgumentException(String.format("worker group path : %s is not valid, ignore", path)); } - String group = parts[4]; + String group = parts[parts.length - 2]; return group; } }