Browse Source

fix ds muti-level directory in zk, which lead to fail to assign work

pull/3/MERGE
XiaotaoYi 4 years ago
parent
commit
5fdc43cdca
  1. 4
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java

4
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/registry/ZookeeperNodeManager.java

@ -155,10 +155,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;
}
}

Loading…
Cancel
Save