mikecaat opened a new issue #2376: URL: https://github.com/apache/bookkeeper/issues/2376
**BUG REPORT** Since I'm not familiar with this product, please let me know if there are my misunderstood points. ***Describe the bug*** Since I want to test the scale in feature of bookkeeper, I want to check which ledgers are stored on which server. To do so, I decide to use `listledgers` command with `-bookieid` option. But I misunderstood that `listbookies` don't output bookieIds. ( BTW, the option `-bookieid` is missing in the [latest document]( http://bookkeeper.apache.org/docs/latest/reference/cli/#bookkeeper-shell-listledgers). ) I think these behavior can confuse some users. Is it better that `listbookies` return the unique bookieIds? ***To Reproduce*** 1. build bookkeeper I use the following commit source code. commit : cd0970101306a2c031506ea9cea402803639e806 2. start bookkeeper with default configuration ``` > bin/bookkeeper localbookie 10 ``` 3. insert some data ``` > bin/bookkeeper shell simpletest --ensemble 3 --writeQuorum 2 --ackQuorum 1 --numEntries 1 ``` 4. show list bookies I misunderstood that the following output shows bookieIds. ``` > bin/bookkeeper shell listbookies -a ... All Bookies : 127.0.1.1(hostname):5000 .. ``` 5. get list ledgers written in the specific bookie. My struggle point was the error was not occurred. I think the reason is that specified bookieId have [colon and two parts](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/net/BookieSocketAddress.java#L65) . ``` > bin/bookkeeper shell listledgers -bookieid "127.0.1.1(hostname):5000" ``` The following code works. Is the "127.0.1.1:5000" real bookieId? ``` > bin/bookkeeper shell listledgers -bookieid "127.0.1.1:5000" ``` The main problem is [the match condition](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java#L1587 ) does not work. ***Expected behavior*** If there is a unique bookieId, it's better that `listbookies` returns it and `listledgers` should check using the id. How do you think? If you are ok, I'll try to fix it. ---------------------------------------------------------------- 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]
