sijie commented on a change in pull request #5985: [Issue 5935] Support multi 
pulsar clusters to use the same bk cluster
URL: https://github.com/apache/pulsar/pull/5985#discussion_r409863585
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
 ##########
 @@ -1064,6 +1087,27 @@ public String getSafeBrokerServiceUrl() {
         return brokerServiceUrl != null ? brokerServiceUrl : 
brokerServiceUrlTls;
     }
 
+    /**
+     * Get bookkeeper metadata service uri.
+     *
+     * @param config broker configuration
+     * @return the metadata service uri that bookkeeper is used
+     */
+    public static String bookieMetadataServiceUri(ServiceConfiguration config) 
{
+        ClientConfiguration bkConf = new ClientConfiguration();
+        // init bookkeeper metadata service uri
+        String metadataServiceUri = null;
+        try {
 
 Review comment:
   I don't think we should add this logic here. We should reply on the logic 
that bookkeeper already provides. You can do this by using the following code 
snippet.
   
   ```
   ClientConfiguration bkConf = new ClientConfiguration();
   bkConf.setZkServers(config.getZooKeeperServers());
   return bkConf.getMetadataServiceUri();
   ```

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to