zymap commented on a change in pull request #4018: Support multi-host for
pulsar-admin
URL: https://github.com/apache/pulsar/pull/4018#discussion_r274242502
##########
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:
Thanks for review. You are right. That's only support choose a random host
for service. I try to add a retry that's need wrapper almost all http method in
jersey. Then i found all method invoke by `new
JerseyInvocation(this)).invoke(responseType)`, but that is private so i can't
extend. If you have any suggestion feel free to let me know.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services