wsjz commented on code in PR #21873:
URL: https://github.com/apache/doris/pull/21873#discussion_r1267471478
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogIf.java:
##########
@@ -153,6 +153,10 @@ default void onClose() {
String getComment();
+ default long getLastUpdateTime() {
+ return -1L;
Review Comment:
what the result after TimeUtils.longToTimeString(lastUpdateTime) if set
LastUpdateTime to -1 here?
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java:
##########
@@ -398,6 +398,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 lastUpdateTime = catalog.getLastUpdateTime();
+ row.add(lastUpdateTime > 0 ?
TimeUtils.longToTimeString(lastUpdateTime) : "UNRECORDED");
Review Comment:
1
##########
fe/fe-core/src/main/java/org/apache/doris/common/proc/DbsProcDir.java:
##########
@@ -122,7 +122,8 @@ public ProcResult fetchResult() throws AnalysisException {
dbInfo.add(replicaCount);
dbInfo.add(replicaQuota);
dbInfo.add(transactionQuota);
-
+ long lastUpdateTime = db.getLastUpdateTime();
+ dbInfo.add(lastUpdateTime > 0 ?
TimeUtils.longToTimeString(lastUpdateTime) : "UNRECORDED");
Review Comment:
1
##########
fe/fe-core/src/main/java/org/apache/doris/common/proc/TablesProcDir.java:
##########
@@ -128,8 +129,8 @@ public ProcResult fetchResult() throws AnalysisException {
tableInfo.add(FeConstants.null_string);
tableInfo.add(replicaCount);
}
-
-
+ long lastUpdateTime = table.getLastUpdateTime();
+ tableInfo.add(lastUpdateTime > 0 ?
TimeUtils.longToTimeString(lastUpdateTime) : "UNRECORDED");
Review Comment:
maybe lastUpdateTime is -1L,Can the TimeUtils.longToTimeString(-1) instead
of "UNRECORDED"?
##########
fe/fe-core/src/main/java/org/apache/doris/common/proc/TablesProcDir.java:
##########
@@ -128,8 +129,8 @@ public ProcResult fetchResult() throws AnalysisException {
tableInfo.add(FeConstants.null_string);
tableInfo.add(replicaCount);
}
-
-
+ long lastUpdateTime = table.getLastUpdateTime();
+ tableInfo.add(lastUpdateTime > 0 ?
TimeUtils.longToTimeString(lastUpdateTime) : "UNRECORDED");
Review Comment:
maybe lastUpdateTime is -1L,Can the TimeUtils.longToTimeString(-1) instead
of "UNRECORDED"?
--
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]