Add bk rack info setting in cluster metadata setup
Motivation
Currently we have only Admin API Bookies.updateBookieRackInfo() to config rack info.
If we want to setup up a pulsar cluster with some rack info config, we need to start brokers first, wait for brokers start, then call Admin API.
It's better to provide a way to do the config before start brokers to make the deployment more easier.
Modifications
Add rack info setting in cluster metadata setup like:
bin/pulsar initialize-cluster-metadata \
--cluster clusterName \
--zookeeper 127.0.0.1:2181 \
--configuration-store 127.0.0.1:2181 \
--web-service-url http://127.0.0.1:8080 \
--broker-service-url pulsar://127.0.0.1:6650 \
--rack-info address:127.0.0.1:3181,rack:/rack1;address:127.0.0.2:3181,rack:/rack2
Verifying this change
This change added tests and can be verified as follows: ClusterMetadataSetupTest.testSetupWithBkRackInfo
Documentation
- [x]
doc-required(Your PR needs to update docs and you will update later)
/pulsarbot run-failure-checks
/pulsarbot run-failure-checks
The pr had no activity for 30 days, mark with Stale label.