[improve][common] Make Bookkeeper metadata options configurable #17834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
PIP-45 related PRs #12770 and #13296 introduced changes in Pulsar and Bookkeeper configuration for Pulsar so that Pulsar Metadata driver is used for metadata operations in the bookkeeper client (in broker) and in the bookkeeper server (the bookies).
It would be good to have a way to opt-out of this change and configure Pulsar and Bookies without Pulsar Metadata store and use Zookeeper directly.
This PR will allow to use Bookkeeper defaults by setting
export BK_METADATA_OPTIONS=none
.If one would want to configure Bookies without Pulsar Metadata, it is necessary to configure
metadataServiceUri
in bookkeeper.conf andbookkeeperMetadataServiceUri
in broker.conf.For example
bookkeeper.conf
metadataServiceUri=zk://<zk_node_1>:2181/ledgers,zk://<zk_node_2>:2181/ledgers,zk://<zk_node_3>:2181/ledgers
The main purpose of this PR is to make it easier to compare the behavior of Pulsar when using Pulsar Metadata driver for Bookkeeper compared to using Zookeeper directly. It is not necessary make BK_METADATA_OPTIONS configurable to achieve this. However it's better to have an option to control it since that could prevent misconfiguration in cases where it is desired to not use Pulsar metadata driver.
The additional benefit of being able to override BK_METADATA_OPTIONS is that the Pulsar Metadata driver classes wouldn't get loaded at all when they aren't used.
Modifications
Make
BK_METADATA_OPTIONS
configurable.Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)
Matching PR in forked repository
PR in forked repository: lhotari#91