coderzc commented on code in PR #20718:
URL: https://github.com/apache/pulsar/pull/20718#discussion_r1260522826


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -1914,4 +1914,13 @@ public void shutdownNow() {
     protected BrokerService newBrokerService(PulsarService pulsar) throws 
Exception {
         return new BrokerService(pulsar, ioEventLoopGroup);
     }
+
+    private CompactionServiceFactory loadCompactionServiceFactory() {
+        String compactionServiceFactoryClassName = 
config.getCompactionServiceFactoryClassName();
+        var compactionServiceFactory =
+                Reflections.createInstance(compactionServiceFactoryClassName, 
CompactionServiceFactory.class,
+                        Thread.currentThread().getContextClassLoader());
+        compactionServiceFactory.initialize(this).join();

Review Comment:
   I think the asynchronous interface is more extensible, and if we support 
asynchronous initialize in the PulsarService in the future, we don't need to 
change the interface



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to