You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2018/05/23 06:21:37 UTC
[rocketmq] 04/04: Format output
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
commit c264de9c9345c6526a0f1f16088ffaf0bbefaf12
Author: Li Zhanhui <li...@gmail.com>
AuthorDate: Tue May 22 20:12:00 2018 +0800
Format output
---
.../tools/command/consumer/ConsumerProgressSubCommand.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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 7529601..a1b3c1a 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
@@ -129,7 +129,11 @@ public class ConsumerProgressSubCommand implements SubCommand {
diffTotal += diff;
String lastTime = "";
try {
- lastTime = UtilAll.formatDate(new Date(offsetWrapper.getLastTimestamp()), UtilAll.YYYY_MM_DD_HH_MM_SS);
+ if (offsetWrapper.getLastTimestamp() == 0) {
+ lastTime = "N/A";
+ } else {
+ lastTime = UtilAll.formatDate(new Date(offsetWrapper.getLastTimestamp()), UtilAll.YYYY_MM_DD_HH_MM_SS);
+ }
} catch (Exception e) {
}
@@ -144,7 +148,7 @@ public class ConsumerProgressSubCommand implements SubCommand {
mq.getQueueId(),
offsetWrapper.getBrokerOffset(),
offsetWrapper.getConsumerOffset(),
- null != clientIP ? clientIP : "NA",
+ null != clientIP ? clientIP : "N/A",
diff,
lastTime
);
--
To stop receiving notification emails like this one, please contact
lizhanhui@apache.org.