This is an automated email from the ASF dual-hosted git repository.

yuzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 94d7a4e  remove rocketmq-broker dependency (#249)
94d7a4e is described below

commit 94d7a4e4186f07eecd6c4132b4f93e67f773883b
Author: yuz10 <845238...@qq.com>
AuthorDate: Mon Nov 4 11:35:39 2024 +0800

    remove rocketmq-broker dependency (#249)
---
 pom.xml                                                             | 1 +
 .../java/org/apache/rocketmq/dashboard/task/CollectTaskRunnble.java | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 923afa7..8fc87e7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -186,6 +186,7 @@
             <groupId>org.apache.rocketmq</groupId>
             <artifactId>rocketmq-broker</artifactId>
             <version>${rocketmq.version}</version>
+            <scope>test</scope>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
diff --git 
a/src/main/java/org/apache/rocketmq/dashboard/task/CollectTaskRunnble.java 
b/src/main/java/org/apache/rocketmq/dashboard/task/CollectTaskRunnble.java
index 28fd7a5..a5efa18 100644
--- a/src/main/java/org/apache/rocketmq/dashboard/task/CollectTaskRunnble.java
+++ b/src/main/java/org/apache/rocketmq/dashboard/task/CollectTaskRunnble.java
@@ -24,12 +24,12 @@ import java.util.List;
 import java.util.concurrent.ExecutionException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.rocketmq.common.MixAll;
+import org.apache.rocketmq.common.stats.Stats;
 import org.apache.rocketmq.remoting.protocol.body.BrokerStatsData;
 import org.apache.rocketmq.remoting.protocol.body.GroupList;
 import org.apache.rocketmq.remoting.protocol.route.BrokerData;
 import org.apache.rocketmq.remoting.protocol.route.TopicRouteData;
 import org.apache.rocketmq.dashboard.service.DashboardCollectService;
-import org.apache.rocketmq.store.stats.BrokerStatsManager;
 import org.apache.rocketmq.tools.admin.MQAdminExt;
 import org.apache.rocketmq.tools.command.stats.StatsAllSubCommand;
 
@@ -63,7 +63,7 @@ public class CollectTaskRunnble implements Runnable {
                 String masterAddr = bd.getBrokerAddrs().get(MixAll.MASTER_ID);
                 if (masterAddr != null) {
                     try {
-                        BrokerStatsData bsd = 
mqAdminExt.viewBrokerStatsData(masterAddr, BrokerStatsManager.TOPIC_PUT_NUMS, 
topic);
+                        BrokerStatsData bsd = 
mqAdminExt.viewBrokerStatsData(masterAddr, Stats.TOPIC_PUT_NUMS, topic);
                         inTPS += bsd.getStatsMinute().getTps();
                         inMsgCntToday += 
StatsAllSubCommand.compute24HourSum(bsd);
                     } catch (Exception e) {
@@ -78,7 +78,7 @@ public class CollectTaskRunnble implements Runnable {
                         if (masterAddr != null) {
                             try {
                                 String statsKey = String.format("%s@%s", 
topic, group);
-                                BrokerStatsData bsd = 
mqAdminExt.viewBrokerStatsData(masterAddr, BrokerStatsManager.GROUP_GET_NUMS, 
statsKey);
+                                BrokerStatsData bsd = 
mqAdminExt.viewBrokerStatsData(masterAddr, Stats.GROUP_GET_NUMS, statsKey);
                                 outTPS += bsd.getStatsMinute().getTps();
                                 outMsgCntToday += 
StatsAllSubCommand.compute24HourSum(bsd);
                             } catch (Exception e) {

Reply via email to