You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/27 01:40:48 UTC

[GitHub] [pulsar] rdhabalia commented on a change in pull request #10715: ZkIsolatedBookieEnsemblePlacementPolicy should use bookie zookeeper

rdhabalia commented on a change in pull request #10715:
URL: https://github.com/apache/pulsar/pull/10715#discussion_r640229889



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java
##########
@@ -224,10 +229,22 @@ public static void main(String[] args) throws Exception {
             initializer.initializeCluster(bkMetadataServiceUri.getUri(), arguments.numStreamStorageContainers);
         }
 
-        if (!localStore.exists(ZkBookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH).get()) {
-            createMetadataNode(localStore, ZkBookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH, "{}".getBytes());
+        // exist the existing-bk-metadata-service-uri or bookkeeper-metadata-service-uri,
+        // should create metadata on the bookkeeper side
+        if (existBk) {
+            URI bkUri = URI.create(uriStr);
+            String bkZKStr = StringUtils.replace(bkUri.getAuthority(), ";", ",") + bkUri.getPath();

Review comment:
       it should go to some util class to reuse it and we should add example and documentation on 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:
users@infra.apache.org