Merge branch 'web_backend_develope' of https://git.trustie.net/fhx569287825/aggregation-platform into web_backend_develope

web_backend_develope
chenlw 9 years ago
commit 44260a720c

@ -24,7 +24,7 @@
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"></param>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>

@ -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");
@ -51,9 +51,12 @@ public class ClusterInfo {
log.error("1102 command get result is nothing");
return null;
}
if (reStrings.get(0).contains("No peers present")) {
return peerIps;
}
if (!(reStrings.get(0).split(":")[0].contains("Number of Peers"))) {
log.error("1103 get result string wrong");
return null;
}
@ -90,7 +93,7 @@ public class ClusterInfo {
}
}
peerIps.put(Constant.hostIp, Constant.peerincluster_connected);
// for (Map.Entry<String, String> entry:peerIps.entrySet()){
// String key=entry.getKey();
// if(key.equals(Constant.hostIp)){

Loading…
Cancel
Save