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



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -92,6 +96,36 @@ protected ZooKeeperCache localZkCache() {
         return pulsar().getLocalZkCache();
     }
 
+    // bookkeeper zookeeper
+    protected ZooKeeper bookieZk() {
+        ZooKeeper zkClient = null;
+
+        ServiceConfiguration config = pulsar().getConfiguration();
+
+        String bookkeeperMetadataServiceUri = 
config.getBookkeeperMetadataServiceUri();
+        URI uri = URI.create(bookkeeperMetadataServiceUri);
+        String bookieZkConnect = StringUtils.replace(uri.getAuthority(), ";", 
",") + uri.getPath();
+
+        int zkTimeout = (int) config.getZooKeeperSessionTimeoutMillis();
+        try {
+            zkClient = 
ZooKeeperClient.newBuilder().connectString(bookieZkConnect)

Review comment:
       yeah, but it depends on the refactoring of the 
"ZkIsolatedBookieEnsemblePlacementPolicy" and "ZkBookieRackAffinityMapping" 
first.




-- 
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:
[email protected]


Reply via email to