+ ret = execQuery(url);\r
+ } catch (Exception e) {\r
+ log.warn(e.getMessage(), e);\r
+ }\r
+ log.info("The query url is: " + url + ". The corresponding configurations are " + ret);\r
+ return ret;\r
+ }\r
+\r
+ public static String getMsbServerAddrWithHttpPrefix() {\r
+ String[] addrInfo = getMsbIpAndPort();\r
+ String ret = addrInfo[0] + ":" + addrInfo[1];\r
+ if (!ret.startsWith(AlarmConst.HTTP) || !ret.startsWith(AlarmConst.HTTPS)) {\r
+ ret = AlarmConst.HTTP + ret;\r
+ }\r
+ return ret;\r
+ }\r
+\r
+ public static String[] getMsbIpAndPort() {\r
+ return split(getEnv(MSB_ADDR));\r
+ }\r
+\r
+ public static String[] getMicroServiceIpAndPort() {\r
+ String[] serviceAddrInfo = null;\r
+ String info = getServiceAddrInfoFromDcaeConsulByHostName(getEnv(HOSTNAME));\r
+ log.info("Got the service information of \"" + getEnv(HOSTNAME) + "\" from Consul. The response is " + info + ".");\r
+ if (info != null && !info.isEmpty()) {\r
+ serviceAddrInfo = split(info);\r
+ } else {\r
+ serviceAddrInfo = split(getEnv(HOSTNAME));\r