You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/06 01:29:28 UTC

[GitHub] [rocketmq] ltamber commented on a diff in pull request #4108: [ISSUE #4107] rocketmq-tools should not depend on rocketmq-store

ltamber commented on code in PR #4108:
URL: https://github.com/apache/rocketmq/pull/4108#discussion_r843386092


##########
store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:
##########
@@ -29,37 +30,37 @@
 
 public class BrokerStatsManager {
 
-    public static final String QUEUE_PUT_NUMS = "QUEUE_PUT_NUMS";
-    public static final String QUEUE_PUT_SIZE = "QUEUE_PUT_SIZE";
-    public static final String QUEUE_GET_NUMS = "QUEUE_GET_NUMS";
-    public static final String QUEUE_GET_SIZE = "QUEUE_GET_SIZE";
-    public static final String TOPIC_PUT_NUMS = "TOPIC_PUT_NUMS";
-    public static final String TOPIC_PUT_SIZE = "TOPIC_PUT_SIZE";
-    public static final String GROUP_GET_NUMS = "GROUP_GET_NUMS";
-    public static final String GROUP_GET_SIZE = "GROUP_GET_SIZE";
-    public static final String SNDBCK_PUT_NUMS = "SNDBCK_PUT_NUMS";
-    public static final String BROKER_PUT_NUMS = "BROKER_PUT_NUMS";
-    public static final String BROKER_GET_NUMS = "BROKER_GET_NUMS";
-    public static final String GROUP_GET_FROM_DISK_NUMS = "GROUP_GET_FROM_DISK_NUMS";
-    public static final String GROUP_GET_FROM_DISK_SIZE = "GROUP_GET_FROM_DISK_SIZE";
-    public static final String BROKER_GET_FROM_DISK_NUMS = "BROKER_GET_FROM_DISK_NUMS";
-    public static final String BROKER_GET_FROM_DISK_SIZE = "BROKER_GET_FROM_DISK_SIZE";
+    public static final String QUEUE_PUT_NUMS = Stats.QUEUE_PUT_NUMS;
+    public static final String QUEUE_PUT_SIZE = Stats.QUEUE_PUT_SIZE;
+    public static final String QUEUE_GET_NUMS = Stats.QUEUE_GET_NUMS;
+    public static final String QUEUE_GET_SIZE = Stats.QUEUE_GET_SIZE;
+    public static final String TOPIC_PUT_NUMS = Stats.TOPIC_PUT_NUMS;
+    public static final String TOPIC_PUT_SIZE = Stats.TOPIC_PUT_SIZE;
+    public static final String GROUP_GET_NUMS = Stats.GROUP_GET_NUMS;
+    public static final String GROUP_GET_SIZE = Stats.GROUP_GET_SIZE;
+    public static final String SNDBCK_PUT_NUMS = Stats.SNDBCK_PUT_NUMS;
+    public static final String BROKER_PUT_NUMS = Stats.BROKER_PUT_NUMS;
+    public static final String BROKER_GET_NUMS = Stats.BROKER_GET_NUMS;
+    public static final String GROUP_GET_FROM_DISK_NUMS = Stats.GROUP_GET_FROM_DISK_NUMS;
+    public static final String GROUP_GET_FROM_DISK_SIZE = Stats.GROUP_GET_FROM_DISK_SIZE;
+    public static final String BROKER_GET_FROM_DISK_NUMS = Stats.BROKER_GET_FROM_DISK_NUMS;
+    public static final String BROKER_GET_FROM_DISK_SIZE = Stats.BROKER_GET_FROM_DISK_SIZE;
     // For commercial
-    public static final String COMMERCIAL_SEND_TIMES = "COMMERCIAL_SEND_TIMES";
-    public static final String COMMERCIAL_SNDBCK_TIMES = "COMMERCIAL_SNDBCK_TIMES";
-    public static final String COMMERCIAL_RCV_TIMES = "COMMERCIAL_RCV_TIMES";
-    public static final String COMMERCIAL_RCV_EPOLLS = "COMMERCIAL_RCV_EPOLLS";
-    public static final String COMMERCIAL_SEND_SIZE = "COMMERCIAL_SEND_SIZE";
-    public static final String COMMERCIAL_RCV_SIZE = "COMMERCIAL_RCV_SIZE";
-    public static final String COMMERCIAL_PERM_FAILURES = "COMMERCIAL_PERM_FAILURES";
+    public static final String COMMERCIAL_SEND_TIMES = Stats.COMMERCIAL_SEND_TIMES;
+    public static final String COMMERCIAL_SNDBCK_TIMES = Stats.COMMERCIAL_SNDBCK_TIMES;
+    public static final String COMMERCIAL_RCV_TIMES = Stats.COMMERCIAL_RCV_TIMES;
+    public static final String COMMERCIAL_RCV_EPOLLS = Stats.COMMERCIAL_RCV_EPOLLS;
+    public static final String COMMERCIAL_SEND_SIZE = Stats.COMMERCIAL_SEND_SIZE;
+    public static final String COMMERCIAL_RCV_SIZE = Stats.COMMERCIAL_RCV_SIZE;
+    public static final String COMMERCIAL_PERM_FAILURES = Stats.COMMERCIAL_PERM_FAILURES;

Review Comment:
   IMO these definition are duplicate, maybe use Stats.xxx directly is better.



-- 
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: dev-unsubscribe@rocketmq.apache.org

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