morningman commented on a change in pull request #3713:
URL: https://github.com/apache/incubator-doris/pull/3713#discussion_r431672560



##########
File path: fe/src/main/java/org/apache/doris/system/Backend.java
##########
@@ -94,6 +94,9 @@
     // this field is set by tablet report, and just for metric monitor, no 
need to persist.
     private AtomicLong tabletMaxCompactionScore = new AtomicLong(0);
 
+    // additional backendStatus information for BE, display in JSON format
+    private BackendStatus backendStatus;

Review comment:
       ```suggestion
       private BackendStatus backendStatus = new BackendStatus();
   ```
   And remove all constructors below.

##########
File path: fe/src/main/java/org/apache/doris/master/ReportHandler.java
##########
@@ -247,6 +249,13 @@ private static void tabletReport(long backendId, Map<Long, 
TTablet> backendTable
         LOG.info("backend[{}] reports {} tablet(s). report version: {}",
                  backendId, backendTablets.size(), backendReportVersion);
 
+        final SystemInfoService currentSystemInfo = 
Catalog.getCurrentSystemInfo();
+        Backend reportBackend = currentSystemInfo.getBackend(backendId);
+        if (reportBackend != null) {
+            BackendStatus backendStatus = reportBackend.getBackendStatus();
+            backendStatus.lastTabletReportTime = 
TimeUtils.longToTimeString(start);

Review comment:
       Better to create a method called `backend.updateStatus()`  to set these 
infos. 
   Maybe we will add more info later.




----------------------------------------------------------------
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.

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