rdhabalia commented on code in PR #486:
URL: https://github.com/apache/pulsar-manager/pull/486#discussion_r961978656


##########
src/main/java/org/apache/pulsar/manager/service/impl/BrokerStatsServiceImpl.java:
##########
@@ -124,13 +129,22 @@ private void scheduleCollectStats() {
             clusterLists.forEach((clusterMap) -> {
                 String cluster = (String) clusterMap.get("cluster");
                 Pair<String, String> envCluster = Pair.of(env.getName(), 
cluster);
-                String webServiceUrl = (String) clusterMap.get("serviceUrl");
+
+                String webServiceUrl = (String) (tlsEnabled && 
clusterMap.containsKey("serviceUrlTls") && StringUtils.isNotBlank((String) 
clusterMap.get("serviceUrlTls")) ?

Review Comment:
   ```
   String serviceUrlTls = clusterMap.get("serviceUrlTls");
   tlsEnabled = tlsEnabled && StringUtils.isNotBlank(serviceUrlTls);
   String webServiceUrl = tlsEnabled ? serviceUrlTls : 
clusterMap.get("serviceUrl");
   
   at line#140
   if(!url.startsWith("http") {
      url = (tlsEnabled ? "https://"; : "http://";) + url;
   }
   
   we can remove line#144
   
   ```
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to