You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/22 10:38:35 UTC

[GitHub] [pulsar-manager] eolivelli commented on a change in pull request #306: Support multi address for broker stats

eolivelli commented on a change in pull request #306:
URL: https://github.com/apache/pulsar-manager/pull/306#discussion_r443469051



##########
File path: src/main/java/org/apache/pulsar/manager/service/impl/BrokerStatsServiceImpl.java
##########
@@ -131,7 +131,12 @@ private void scheduleCollectStats() {
             clusterLists.forEach((clusterMap) -> {
                 String cluster = (String) clusterMap.get("cluster");
                 Pair<String, String> envCluster = Pair.of(env.getName(), cluster);
-                collectStatsServiceUrls.put(envCluster, (String) clusterMap.get("serviceUrl"));
+                String webServiceUrl = (String) clusterMap.get("serviceUrl");
+                if (webServiceUrl.contains(",")) {
+                    String[] webServiceUrlList = webServiceUrl.split(",");
+                    webServiceUrl = webServiceUrlList[0];

Review comment:
       here you are keeping only the first one.
   what about if it is down ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org