You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/18 14:07:57 UTC

[GitHub] [incubator-inlong] healchow commented on a change in pull request #3219: [INLONG-3201][TubeMQ] Improve the cluster query function

healchow commented on a change in pull request #3219:
URL: https://github.com/apache/incubator-inlong/pull/3219#discussion_r830034404



##########
File path: inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/controller/cluster/ClusterController.java
##########
@@ -185,4 +190,95 @@ String queryInfo(
         return masterService.queryMaster(url);
     }
 
+    public Map<String, Integer> getAllCount(Integer clusterId) {
+        int brokerSize = getBrokerSize(clusterId);
+        Map<String, Integer> mapCount = getTopicAndPartitionCount(clusterId);
+        int consumerGroupCount = getConsumerGroupCount(clusterId);
+        int consumerCount = getConsumerCount(clusterId);
+        Map<String, Integer> map = new HashMap<>();
+        map.put("brokerSize", brokerSize);
+        map.put("topicCount", mapCount.get("topicCount"));
+        map.put("partitionCount", mapCount.get("partitionCount"));
+        map.put("consumerGroupCount", consumerGroupCount);
+        map.put("consumerCount", consumerCount);

Review comment:
       Maybe you can create a POJO class to set those fields?




-- 
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@inlong.apache.org

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