未验证 提交 afcd3314 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Fix zk path error. (#963)

上级 b1265dfc
......@@ -34,6 +34,7 @@ import org.apache.skywalking.apm.collector.cluster.DataMonitor;
import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
import org.apache.skywalking.apm.collector.core.CollectorException;
import org.apache.skywalking.apm.collector.core.util.CollectionUtils;
import org.apache.skywalking.apm.util.StringUtil;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
......@@ -165,7 +166,11 @@ public class ClusterZKDataMonitor implements DataMonitor, Watcher {
}
@Override public String getBaseCatalog() {
return "/" + namespace + "/skywalking";
if (StringUtil.isEmpty(namespace)) {
return "/skywalking";
} else {
return "/" + namespace + "/skywalking";
}
}
void setNamespace(String namespace) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册