morningman commented on code in PR #21873:
URL: https://github.com/apache/doris/pull/21873#discussion_r1264993975


##########
fe/fe-core/src/main/java/org/apache/doris/common/proc/DbsProcDir.java:
##########
@@ -122,7 +124,8 @@ public ProcResult fetchResult() throws AnalysisException {
                 dbInfo.add(replicaCount);
                 dbInfo.add(replicaQuota);
                 dbInfo.add(transactionQuota);
-
+                long lastSyncTime = db.getLastSyncTime();
+                dbInfo.add(lastSyncTime > 0 ? 
simpleDateFormat.format(lastSyncTime) : "UNRECORDED");

Review Comment:
   use `TimeUtils.longToTimeString`



##########
fe/fe-core/src/main/java/org/apache/doris/common/proc/TablesProcDir.java:
##########
@@ -128,8 +131,8 @@ public ProcResult fetchResult() throws AnalysisException {
                     tableInfo.add(FeConstants.null_string);
                     tableInfo.add(replicaCount);
                 }
-
-
+                long lastSyncTime = table.getLastSyncTime();
+                tableInfo.add(lastSyncTime > 0 ? 
simpleDateFormat.format(lastSyncTime) : "UNRECORDED");

Review Comment:
   use TimeUtils.longToTimeString



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java:
##########
@@ -396,6 +397,8 @@ public ShowResultSet showCatalogs(ShowCatalogStmt showStmt, 
String currentCtlg)
                         Map<String, String> props = catalog.getProperties();
                         String createTime = 
props.getOrDefault(CreateCatalogStmt.CREATE_TIME_PROP, "UNRECORDED");
                         row.add(createTime);
+                        long lastSyncTime = catalog.getLastSyncTime();
+                        row.add(lastSyncTime > 0 ? 
simpleDateFormat.format(lastSyncTime) : "UNRECORDED");

Review Comment:
   use TimeUtils.longToTimeString



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to