Skip to content

Commit

Permalink
[improve][common] Make Bookkeeper metadata options configurable (#17834)
Browse files Browse the repository at this point in the history
- use Bookkeeper defaults by setting BK_METADATA_OPTIONS=none
  • Loading branch information
lhotari authored Sep 27, 2022
1 parent d4893d1 commit 6dd38a4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,13 @@ ZK_OPTS=" -Dzookeeper.4lw.commands.whitelist=* -Dzookeeper.snapshot.trust.empty=

LOG4J2_SHUTDOWN_HOOK_DISABLED="-Dlog4j.shutdownHookEnabled=false"

# Adding pulsar metadata as a recognized provider
BK_METADATA_OPTIONS="-Dbookkeeper.metadata.bookie.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataBookieDriver -Dbookkeeper.metadata.client.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataClientDriver"
OPTS="$OPTS $BK_METADATA_OPTIONS"
# By default, Pulsar Metadata driver will be used for Bookkeeper client and server metadata operations
# This can be disabled by setting BK_METADATA_OPTIONS=none
if [[ "$BK_METADATA_OPTIONS" != "none" ]]; then
# Adding pulsar metadata as a recognized provider
BK_METADATA_OPTIONS="${BK_METADATA_OPTIONS:-"-Dbookkeeper.metadata.bookie.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataBookieDriver -Dbookkeeper.metadata.client.drivers=org.apache.pulsar.metadata.bookkeeper.PulsarMetadataClientDriver"}"
OPTS="$OPTS $BK_METADATA_OPTIONS"
fi

#Change to PULSAR_HOME to support relative paths
cd "$PULSAR_HOME"
Expand Down

0 comments on commit 6dd38a4

Please sign in to comment.