|
@@ -85,7 +85,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
@@ -85,7 +85,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
85
|
String rootString = "";
|
85
|
String rootString = "";
|
86
|
int page=0;
|
86
|
int page=0;
|
87
|
RetryPolicy retryPolicy = new RetryOneTime(1000);
|
87
|
RetryPolicy retryPolicy = new RetryOneTime(1000);
|
88
|
- CuratorFramework client = CuratorFrameworkFactory.newClient(req.getZkIp()+ ":2181", 5 * 1000, 5 * 1000, retryPolicy);
|
88
|
+ CuratorFramework client = CuratorFrameworkFactory.newClient(req.getIp()+ ":2181", 5 * 1000, 5 * 1000, retryPolicy);
|
89
|
client.start();
|
89
|
client.start();
|
90
|
try {
|
90
|
try {
|
91
|
List<String> children = client.getChildren().forPath(root);
|
91
|
List<String> children = client.getChildren().forPath(root);
|
|
@@ -95,7 +95,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
@@ -95,7 +95,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
95
|
rootString = root+"/"+chi;
|
95
|
rootString = root+"/"+chi;
|
96
|
zkConfig.setName(chi);
|
96
|
zkConfig.setName(chi);
|
97
|
zkConfig.setRoot(rootString);
|
97
|
zkConfig.setRoot(rootString);
|
98
|
- zkConfig.setZkIp(req.getZkIp());
|
98
|
+ zkConfig.setIp(req.getIp());
|
99
|
list.add(zkConfig);
|
99
|
list.add(zkConfig);
|
100
|
page++;
|
100
|
page++;
|
101
|
}
|
101
|
}
|
|
@@ -106,7 +106,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
@@ -106,7 +106,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
106
|
response.setRows(list);
|
106
|
response.setRows(list);
|
107
|
|
107
|
|
108
|
} catch (Exception e) {
|
108
|
} catch (Exception e) {
|
109
|
- logger.error("getZkMonitorTree fail with ip is {}",req.getZkIp());
|
109
|
+ logger.error("getZkMonitorTree fail with ip is {}",req.getIp());
|
110
|
e.printStackTrace();
|
110
|
e.printStackTrace();
|
111
|
} finally {
|
111
|
} finally {
|
112
|
client.close();
|
112
|
client.close();
|
|
@@ -206,7 +206,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
@@ -206,7 +206,7 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
206
|
public int editZkMonitorRoot(ZkTreeReq req) {
|
206
|
public int editZkMonitorRoot(ZkTreeReq req) {
|
207
|
int result = 0;
|
207
|
int result = 0;
|
208
|
RetryPolicy retryPolicy = new RetryOneTime(1000);
|
208
|
RetryPolicy retryPolicy = new RetryOneTime(1000);
|
209
|
- CuratorFramework client = CuratorFrameworkFactory.newClient(req.getZkIp()+ ":2181", 5 * 1000, 5 * 1000, retryPolicy);
|
209
|
+ CuratorFramework client = CuratorFrameworkFactory.newClient(req.getIp()+ ":2181", 5 * 1000, 5 * 1000, retryPolicy);
|
210
|
client.start();
|
210
|
client.start();
|
211
|
try {
|
211
|
try {
|
212
|
List<ZkConfigAll> childList=getAllChildren(req,client);
|
212
|
List<ZkConfigAll> childList=getAllChildren(req,client);
|