commit | 663000df507c54f3a6b3367ba074c85815f04b46 | [log] [tgz] |
---|---|---|
author | Enrico Olivelli <eolivelli@gmail.com> | Wed Jan 27 12:10:45 2021 +0100 |
committer | GitHub <noreply@github.com> | Wed Jan 27 12:10:45 2021 +0100 |
tree | 57a985d89ccc8ffe1cd7cca27e94512f3e5a7623 | |
parent | 3f7da147c08cfc5071899bed640c4f3bfe331e1c [diff] |
Fix BookKeeper shell "list bookies" in case of downbookie and reduce noisy log during re-replication in case of down bookie ### Motivation When a bookie is down you can see many error both on command line tools and during replicator work. Also the CLI is not working at all ``` This is the error on "bookkeeper shell listbookies" when a bookie is downb org.apache.bookkeeper.client.BKException$BKBookieHandleNotAvailableException: Bookie handle is not available at org.apache.bookkeeper.discover.ZKRegistrationClient.getBookieServiceInfo(ZKRegistrationClient.java:248) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.client.DefaultBookieAddressResolver.resolve(DefaultBookieAddressResolver.java:43) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.helpers.CommandHelpers.getBookieSocketAddrStringRepresentation(CommandHelpers.java:45) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.printBookies(ListBookiesCommand.java:124) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.run(ListBookiesCommand.java:113) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.run(ListBookiesCommand.java:43) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.helpers.DiscoveryCommand.apply(DiscoveryCommand.java:57) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.tools.cli.helpers.ClientCommand.apply(ClientCommand.java:60) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.bookie.BookieShell$ListBookiesCmd.runCmd(BookieShell.java:1202) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.bookie.BookieShell$MyCommand.runCmd(BookieShell.java:236) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.bookie.BookieShell.run(BookieShell.java:2235) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] at org.apache.bookkeeper.bookie.BookieShell.main(BookieShell.java:2326) [org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0] ``` ### Changes Reduce the log level, and save printing useless stacktraces: - CommandsHelpers -> prevent error on the CLI in case of down bookie (this is a blocker for the usage of the CLI) - PerChannelBookieClient -> any time you try to connect to a down bookie - DefaultBookieAddressResolver -> duplicate log line, the error already bubbles up on the caller Reviewers: Flavio Junqueira <fpj@apache.org> This closes #2538 from eolivelli/fix/reduce-logs
Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
Please visit the Documentation from the project website for more information.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.
Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.
Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See Developer Setup to get your local environment setup.
Take a look at our open issues: JIRA Issues Github Issues.
Review our coding style and follow our pull requests to learn about our conventions.
Make your changes according to our contribution guide.