You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Technoboy- (via GitHub)" <gi...@apache.org> on 2023/08/04 04:58:50 UTC
[GitHub] [pulsar] Technoboy- commented on issue #20871: [Bug] When bookie-rack is not configured, pulsar-admin bookies get-bookie-rack -b is throwing 'Bookie address not found' error
Technoboy- commented on issue #20871:
URL: https://github.com/apache/pulsar/issues/20871#issuecomment-1664968674
> > Would you like to try to fix this?
>
> I'd like to help. Here are my thoughts
>
> change the following code
>
> https://github.com/apache/pulsar/blob/69298da9f8bd009b72eb5533d31c8c7a696b2a63/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Bookies.java#L108-L121
>
> like this
>
> ```java
> if (bi.isPresent()) {
> asyncResponse.resume(bi.get());
> } else {
> Set<BookieId> bookieIds = getAllBookieIds();
> if (bookieIds.contains(BookieId.parse(bookieAddress))) {
> asyncResponse.resume((BookieInfo) null);
> } else {
> asyncResponse.resume(new RestException(Status.NOT_FOUND,
> "Bookie address not found: " + bookieAddress));
> }
> }
> ```
>
> The `getAllBookieIds()` method can be implemented by referring to the following methods
>
> https://github.com/apache/pulsar/blob/69298da9f8bd009b72eb5533d31c8c7a696b2a63/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Bookies.java#L78-L97
>
> I think `delete-bookie-rack` api has the same issue
>
> @Technoboy-
Ah, how about simplifying and changing the promote message more clear ?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org