This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new afcd331 Fix zk path error. (#963)
afcd331 is described below
commit afcd3314d13ca3c0ddaa70e81b8cdeda0e870536
Author: 吴晟 Wu Sheng <[email protected]>
AuthorDate: Mon Mar 19 18:03:17 2018 +0800
Fix zk path error. (#963)
---
.../apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/apache/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
b/apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/apache/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
index eb51be6..4def6a8 100644
---
a/apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/apache/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
+++
b/apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/apache/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
@@ -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) {
--
To stop receiving notification emails like this one, please contact
[email protected].