提交 c264de9c 编写于 作者: L Li Zhanhui

Format output

上级 0499586e
...@@ -129,7 +129,11 @@ public class ConsumerProgressSubCommand implements SubCommand { ...@@ -129,7 +129,11 @@ public class ConsumerProgressSubCommand implements SubCommand {
diffTotal += diff; diffTotal += diff;
String lastTime = ""; String lastTime = "";
try { 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) { } catch (Exception e) {
} }
...@@ -144,7 +148,7 @@ public class ConsumerProgressSubCommand implements SubCommand { ...@@ -144,7 +148,7 @@ public class ConsumerProgressSubCommand implements SubCommand {
mq.getQueueId(), mq.getQueueId(),
offsetWrapper.getBrokerOffset(), offsetWrapper.getBrokerOffset(),
offsetWrapper.getConsumerOffset(), offsetWrapper.getConsumerOffset(),
null != clientIP ? clientIP : "NA", null != clientIP ? clientIP : "N/A",
diff, diff,
lastTime lastTime
); );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册