eolivelli commented on code in PR #16557:
URL: https://github.com/apache/pulsar/pull/16557#discussion_r960482131


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -822,13 +825,42 @@ public CompletableFuture<Void> 
splitAndOwnBundle(NamespaceBundle bundle, boolean
         return unloadFuture;
     }
 
+    public Map<String, TopicStatsImpl> getTopicStats(NamespaceBundle bundle) {
+        ConcurrentOpenHashMap<String, Topic> topicMap = 
pulsar.getBrokerService().getMultiLayerTopicMap()
+        .computeIfAbsent(bundle.getNamespaceObject().toString(), k -> {

Review Comment:
   we should modify the multiLayerTopicMap returned by the BrokerService.
   this part that accesses that data structure should be inside BrokerService, 
otherwise we are breaking incapsulation



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