提交 5fdc43cd 编写于 作者: X XiaotaoYi

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

上级 5756d6b0
...@@ -155,10 +155,10 @@ public class ZookeeperNodeManager implements InitializingBean { ...@@ -155,10 +155,10 @@ public class ZookeeperNodeManager implements InitializingBean {
private String parseGroup(String path){ private String parseGroup(String path){
String[] parts = path.split("\\/"); 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)); 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; return group;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册