This is an automated email from the ASF dual-hosted git repository.
zhoubo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 6dff04f [ISSUE #3642] Display GID and Topic with namespace (#3648)
6dff04f is described below
commit 6dff04fcb6405fc53a90730cf36ed9a79335bef5
Author: zhaohai <[email protected]>
AuthorDate: Fri Jan 14 13:58:49 2022 +0800
[ISSUE #3642] Display GID and Topic with namespace (#3648)
---
.../common/protocol/body/ConsumerRunningInfo.java | 8 ++++----
.../command/broker/BrokerConsumeStatsSubCommad.java | 6 +++---
.../command/consumer/ConsumerProgressSubCommand.java | 18 +++++++++---------
.../tools/command/stats/StatsAllSubCommand.java | 12 ++++++------
.../tools/command/topic/TopicListSubCommand.java | 6 +++---
5 files changed, 25 insertions(+), 25 deletions(-)
diff --git
a/common/src/main/java/org/apache/rocketmq/common/protocol/body/ConsumerRunningInfo.java
b/common/src/main/java/org/apache/rocketmq/common/protocol/body/ConsumerRunningInfo.java
index d7942eb..0c3df0d 100644
---
a/common/src/main/java/org/apache/rocketmq/common/protocol/body/ConsumerRunningInfo.java
+++
b/common/src/main/java/org/apache/rocketmq/common/protocol/body/ConsumerRunningInfo.java
@@ -223,7 +223,7 @@ public class ConsumerRunningInfo extends
RemotingSerializable {
{
sb.append("\n\n#Consumer Offset#\n");
- sb.append(String.format("%-32s %-32s %-4s %-20s%n",
+ sb.append(String.format("%-64s %-32s %-4s %-20s%n",
"#Topic",
"#Broker Name",
"#QID",
@@ -245,7 +245,7 @@ public class ConsumerRunningInfo extends
RemotingSerializable {
{
sb.append("\n\n#Consumer MQ Detail#\n");
- sb.append(String.format("%-32s %-32s %-4s %-20s%n",
+ sb.append(String.format("%-64s %-32s %-4s %-20s%n",
"#Topic",
"#Broker Name",
"#QID",
@@ -255,7 +255,7 @@ public class ConsumerRunningInfo extends
RemotingSerializable {
Iterator<Entry<MessageQueue, ProcessQueueInfo>> it =
this.mqTable.entrySet().iterator();
while (it.hasNext()) {
Entry<MessageQueue, ProcessQueueInfo> next = it.next();
- String item = String.format("%-32s %-32s %-4d %s%n",
+ String item = String.format("%-64s %-32s %-4d %s%n",
next.getKey().getTopic(),
next.getKey().getBrokerName(),
next.getKey().getQueueId(),
@@ -267,7 +267,7 @@ public class ConsumerRunningInfo extends
RemotingSerializable {
{
sb.append("\n\n#Consumer RT&TPS#\n");
- sb.append(String.format("%-32s %14s %14s %14s %14s %18s %25s%n",
+ sb.append(String.format("%-64s %14s %14s %14s %14s %18s %25s%n",
"#Topic",
"#Pull RT",
"#Pull TPS",
diff --git
a/tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java
b/tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java
index 0dee6de..f462b27 100644
---
a/tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java
+++
b/tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java
@@ -105,7 +105,7 @@ public class BrokerConsumeStatsSubCommad implements
SubCommand {
}
ConsumeStatsList consumeStatsList =
defaultMQAdminExt.fetchConsumeStatsInBroker(brokerAddr, isOrder, timeoutMillis);
- System.out.printf("%-32s %-32s %-32s %-4s %-20s %-20s %-20s
%s%n",
+ System.out.printf("%-64s %-64s %-32s %-4s %-20s %-20s %-20s
%s%n",
"#Topic",
"#Group",
"#Broker Name",
@@ -136,8 +136,8 @@ public class BrokerConsumeStatsSubCommad implements
SubCommand {
}
if (offsetWrapper.getLastTimestamp() > 0)
- System.out.printf("%-32s %-32s %-32s %-4d
%-20d %-20d %-20d %s%n",
- UtilAll.frontStringAtLeast(mq.getTopic(),
32),
+ System.out.printf("%-64s %-64s %-32s %-4d
%-20d %-20d %-20d %s%n",
+ UtilAll.frontStringAtLeast(mq.getTopic(),
64),
group,
UtilAll.frontStringAtLeast(mq.getBrokerName(), 32),
mq.getQueueId(),
diff --git
a/tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java
b/tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java
index 7985f9d..48e0c1b 100644
---
a/tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java
+++
b/tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java
@@ -112,7 +112,7 @@ public class ConsumerProgressSubCommand implements
SubCommand {
messageQueueAllocationResult =
getMessageQueueAllocationResult(defaultMQAdminExt, consumerGroup);
}
if (showClientIP) {
- System.out.printf("%-32s %-32s %-4s %-20s %-20s %-20s
%-20s %s%n",
+ System.out.printf("%-64s %-32s %-4s %-20s %-20s %-20s
%-20s %s%n",
"#Topic",
"#Broker Name",
"#QID",
@@ -122,7 +122,7 @@ public class ConsumerProgressSubCommand implements
SubCommand {
"#Diff",
"#LastTime");
} else {
- System.out.printf("%-32s %-32s %-4s %-20s %-20s %-20s
%s%n",
+ System.out.printf("%-64s %-32s %-4s %-20s %-20s %-20s
%s%n",
"#Topic",
"#Broker Name",
"#QID",
@@ -151,8 +151,8 @@ public class ConsumerProgressSubCommand implements
SubCommand {
clientIP = messageQueueAllocationResult.get(mq);
}
if (showClientIP) {
- System.out.printf("%-32s %-32s %-4d %-20d %-20d
%-20s %-20d %s%n",
- UtilAll.frontStringAtLeast(mq.getTopic(), 32),
+ System.out.printf("%-64s %-32s %-4d %-20d %-20d
%-20s %-20d %s%n",
+ UtilAll.frontStringAtLeast(mq.getTopic(), 64),
UtilAll.frontStringAtLeast(mq.getBrokerName(),
32),
mq.getQueueId(),
offsetWrapper.getBrokerOffset(),
@@ -162,8 +162,8 @@ public class ConsumerProgressSubCommand implements
SubCommand {
lastTime
);
} else {
- System.out.printf("%-32s %-32s %-4d %-20d %-20d
%-20d %s%n",
- UtilAll.frontStringAtLeast(mq.getTopic(), 32),
+ System.out.printf("%-64s %-32s %-4d %-20d %-20d
%-20d %s%n",
+ UtilAll.frontStringAtLeast(mq.getTopic(), 64),
UtilAll.frontStringAtLeast(mq.getBrokerName(),
32),
mq.getQueueId(),
offsetWrapper.getBrokerOffset(),
@@ -178,7 +178,7 @@ public class ConsumerProgressSubCommand implements
SubCommand {
System.out.printf("Consume TPS: %.2f%n",
consumeStats.getConsumeTps());
System.out.printf("Diff Total: %d%n", diffTotal);
} else {
- System.out.printf("%-32s %-6s %-24s %-5s %-14s %-7s %s%n",
+ System.out.printf("%-64s %-6s %-24s %-5s %-14s %-7s %s%n",
"#Group",
"#Count",
"#Version",
@@ -221,8 +221,8 @@ public class ConsumerProgressSubCommand implements
SubCommand {
groupConsumeInfo.setVersion(cc.computeMinVersion());
}
- System.out.printf("%-32s %-6d %-24s %-5s %-14s
%-7d %d%n",
-
UtilAll.frontStringAtLeast(groupConsumeInfo.getGroup(), 32),
+ System.out.printf("%-64s %-6d %-24s %-5s %-14s
%-7d %d%n",
+
UtilAll.frontStringAtLeast(groupConsumeInfo.getGroup(), 64),
groupConsumeInfo.getCount(),
groupConsumeInfo.getCount() > 0 ?
groupConsumeInfo.versionDesc() : "OFFLINE",
groupConsumeInfo.consumeTypeDesc(),
diff --git
a/tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java
b/tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java
index 4707088..e41d57e 100644
---
a/tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java
+++
b/tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java
@@ -94,9 +94,9 @@ public class StatsAllSubCommand implements SubCommand {
if (!activeTopic || (inMsgCntToday > 0) ||
(outMsgCntToday > 0)) {
- System.out.printf("%-32s %-32s %12d %11.2f %11.2f %14d
%14d%n",
- UtilAll.frontStringAtLeast(topic, 32),
- UtilAll.frontStringAtLeast(group, 32),
+ System.out.printf("%-64s %-64s %12d %11.2f %11.2f %14d
%14d%n",
+ UtilAll.frontStringAtLeast(topic, 64),
+ UtilAll.frontStringAtLeast(group, 64),
accumulate,
inTPS,
outTPS,
@@ -108,8 +108,8 @@ public class StatsAllSubCommand implements SubCommand {
} else {
if (!activeTopic || (inMsgCntToday > 0)) {
- System.out.printf("%-32s %-32s %12d %11.2f %11s %14d %14s%n",
- UtilAll.frontStringAtLeast(topic, 32),
+ System.out.printf("%-64s %-64s %12d %11.2f %11s %14d %14s%n",
+ UtilAll.frontStringAtLeast(topic, 64),
"",
0,
inTPS,
@@ -171,7 +171,7 @@ public class StatsAllSubCommand implements SubCommand {
TopicList topicList = defaultMQAdminExt.fetchAllTopicList();
- System.out.printf("%-32s %-32s %12s %11s %11s %14s %14s%n",
+ System.out.printf("%-64s %-64s %12s %11s %11s %14s %14s%n",
"#Topic",
"#Consumer Group",
"#Accumulation",
diff --git
a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java
b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java
index 56aea2e..eefaa8f 100644
---
a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java
+++
b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java
@@ -96,10 +96,10 @@ public class TopicListSubCommand implements SubCommand {
}
for (String group : groupList.getGroupList()) {
- System.out.printf("%-20s %-48s %-48s%n",
+ System.out.printf("%-20s %-64s %-64s%n",
UtilAll.frontStringAtLeast(clusterName, 20),
- UtilAll.frontStringAtLeast(topic, 48),
- UtilAll.frontStringAtLeast(group, 48)
+ UtilAll.frontStringAtLeast(topic, 64),
+ UtilAll.frontStringAtLeast(group, 64)
);
}
}