|
|
|
@ -41,7 +41,7 @@ public class ClusterInfo {
|
|
|
|
|
public Map<String, String> showClusterInfo() {
|
|
|
|
|
log.info("get cluster info");
|
|
|
|
|
Map<String, String> peerIps = new HashMap<String, String>();
|
|
|
|
|
peerIps.put(Constant.hostIp, Constant.peerincluster_connected);
|
|
|
|
|
|
|
|
|
|
List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus);
|
|
|
|
|
if (reStrings == null) {
|
|
|
|
|
log.error("1101 command get result is null");
|
|
|
|
@ -93,6 +93,9 @@ public class ClusterInfo {
|
|
|
|
|
for (Map.Entry<String, String> entry:peerIps.entrySet()){
|
|
|
|
|
String key=entry.getKey();
|
|
|
|
|
String value=entry.getValue();
|
|
|
|
|
if(Constant.ganymedSSH.otherConns==null){
|
|
|
|
|
Constant.ganymedSSH.otherConns=new HashMap<String,Connection>();
|
|
|
|
|
}
|
|
|
|
|
if(!Constant.ganymedSSH.otherConns.containsKey(key)){
|
|
|
|
|
Connection connection=null;
|
|
|
|
|
try {
|
|
|
|
@ -104,7 +107,7 @@ public class ClusterInfo {
|
|
|
|
|
Constant.ganymedSSH.otherConns.put(key,connection);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
peerIps.put(Constant.hostIp, Constant.peerincluster_connected);
|
|
|
|
|
return peerIps;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|