Jason918 commented on code in PR #15147:
URL: https://github.com/apache/pulsar/pull/15147#discussion_r852001487


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleResourceAllocationPolicies.java:
##########
@@ -38,7 +34,7 @@ public SimpleResourceAllocationPolicies(PulsarService pulsar) 
{
         this.pulsar = pulsar;
     }
 
-    public boolean canAssign(ServiceUnit srvUnit, ResourceUnit rescrUnit, 
Map<ResourceUnit, LoadReport> loadReports) {
+    public boolean canAssign() {

Review Comment:
   This method seems to be a partial work. Better not change it.



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2314,7 +2314,8 @@ private void updateConfigurationAndRegisterListeners() {
         }
 
         // add listener to notify topic subscriptionTypesEnabled changed.
-        registerConfigurationListener("subscriptionTypesEnabled", 
this::updateBrokerSubscriptionTypesEnabled);
+        registerConfigurationListener("subscriptionTypesEnabled",

Review Comment:
   Personally, I am in favor of the previous version which save one anonymous 
lambda.



##########
pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundleFactory.java:
##########
@@ -77,7 +76,7 @@ public NamespaceBundleFactory(PulsarService pulsar, 
HashFunction hashFunc) {
 
         this.bundlesCache = Caffeine.newBuilder()
                 .recordStats()
-                .buildAsync(this::loadBundles);
+                .buildAsync((namespace, executor) -> loadBundles(namespace));

Review Comment:
   Same here.



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