codelipenghui commented on code in PR #21894:
URL: https://github.com/apache/pulsar/pull/21894#discussion_r1454948910
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java:
##########
@@ -141,7 +141,9 @@ public void getLeaderBroker(@Suspended final AsyncResponse
asyncResponse) {
validateSuperUserAccessAsync().thenAccept(__ -> {
LeaderBroker leaderBroker =
pulsar().getLeaderElectionService().getCurrentLeader()
.orElseThrow(() -> new
RestException(Status.NOT_FOUND, "Couldn't find leader broker"));
- BrokerInfo brokerInfo =
BrokerInfo.builder().serviceUrl(leaderBroker.getServiceUrl()).build();
+ BrokerInfo brokerInfo = BrokerInfo.builder()
+ .serviceUrl(leaderBroker.getServiceUrl())
+
.lookupServiceAddress(leaderBroker.getLookupServiceAddress()).build();
Review Comment:
I just test it on my laptop
```
bin/pulsar-admin brokers leader-broker
{
"serviceUrl" : "http://localhost:8080",
"lookupServiceAddress" : "localhost:8080"
}
```
Can we avoid this change to the public API? The newly added field
`lookupServiceAddress` might confuse users. Users don't know the value
`localhost:8080` is HTTP lookup service or Binary lookup service.
BTW, the `serviceUrl` is also not a good name. I think it should be
`webServiceUrl`
--
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]