You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/01 10:29:09 UTC

[GitHub] [pulsar] eolivelli commented on a diff in pull request #16557: [PIP-169] Support split bundle by flow or qps

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org