JooHyukKim commented on code in PR #20552:
URL: https://github.com/apache/pulsar/pull/20552#discussion_r1225303499
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java:
##########
@@ -180,6 +184,24 @@ public class ExtensibleLoadManagerImpl implements
ExtensibleLoadManager {
.build();
private final CountDownLatch initWaiter = new CountDownLatch(1);
+ /**
+ * Get all the bundles that are owned by this broker.
+ */
+ public Set<NamespaceBundle> getOwnedServiceUnits() {
+ var entrySet = serviceUnitStateChannel.getOwnershipEntrySet();
+ var brokerId = brokerRegistry.getBrokerId();
Review Comment:
Is the `var` keyword necessary here?
While I don't have any objections to using the `var` keyword (I actually use
it at work), it's worth considering the need for consistency in the codebase.
As I haven't come across this usage in the project so far, it would be
beneficial to reach a consensus on the usage of `var`.
--
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]