You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/10 16:02:23 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #4018: Support multi-host for pulsar-admin

merlimat commented on a change in pull request #4018: Support multi-host for pulsar-admin
URL: https://github.com/apache/pulsar/pull/4018#discussion_r274039066
 
 

 ##########
 File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/PulsarAdmin.java
 ##########
 @@ -162,7 +165,10 @@ public PulsarAdmin(String serviceUrl,
 
         this.client = clientBuilder.build();
 
-        this.serviceUrl = serviceUrl;
+        this.serviceNameResolver = new PulsarServiceNameResolver();
+        this.serviceNameResolver.updateServiceUrl(serviceUrl);
+
+        this.serviceUrl = this.serviceNameResolver.resolveHostUri().toString();
 
 Review comment:
   This will only pick one host (for the `PulsarAdmin` instance) and it will never retry if that host is not reachable

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


With regards,
Apache Git Services