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

@ -41,7 +41,7 @@ public class ClusterInfo {
public Map<String, String> showClusterInfo() { public Map<String, String> showClusterInfo() {
// log.info("get cluster info"); // log.info("get cluster info");
Map<String, String> peerIps = new HashMap<String, String>(); Map<String, String> peerIps = new HashMap<String, String>();
peerIps.put(Constant.hostIp, Constant.peerincluster_connected);
List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus); List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus);
if (reStrings == null) { if (reStrings == null) {
log.error("1101 command get result is null"); log.error("1101 command get result is null");
@ -52,8 +52,11 @@ public class ClusterInfo {
return null; return null;
} }
if (!(reStrings.get(0).split(":")[0].contains("Number of Peers"))) { 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"); log.error("1103 get result string wrong");
return null; return null;
} }
@ -90,7 +93,7 @@ public class ClusterInfo {
} }
} }
peerIps.put(Constant.hostIp, Constant.peerincluster_connected);
// for (Map.Entry<String, String> entry:peerIps.entrySet()){ // for (Map.Entry<String, String> entry:peerIps.entrySet()){
// String key=entry.getKey(); // String key=entry.getKey();
// if(key.equals(Constant.hostIp)){ // if(key.equals(Constant.hostIp)){

Loading…
Cancel
Save