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_r379878481
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
 ##########
 @@ -106,6 +106,14 @@ ClientConfiguration 
createBkClientConfiguration(ServiceConfiguration conf) {
         bkConf.setNettyMaxFrameSizeBytes(conf.getMaxMessageSize() + 
Commands.MESSAGE_SIZE_FRAME_PADDING);
         
bkConf.setDiskWeightBasedPlacementEnabled(conf.isBookkeeperDiskWeightBasedPlacementEnabled());
 
+        if (StringUtils.isNotBlank(conf.getBookkeeperServiceUri())) {
+            bkConf.setMetadataServiceUri(conf.getBookkeeperServiceUri());
+        } else {
+            PulsarService pulsar = new PulsarService(conf);
 
 Review comment:
   I don't think we should try to construct PulsarService. because the 
constructor also does a lot of unrelated things.
   
   I would suggest adding a util function to generate metadata service url from 
the configuration.

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