You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/23 08:05:04 UTC

[GitHub] [dolphinscheduler] guoshupei commented on a diff in pull request #10563: [improve-10506] [server] add MasterHeartBeat and WorkerHeartBeat to extend HeartBeat

guoshupei commented on code in PR #10563:
URL: https://github.com/apache/dolphinscheduler/pull/10563#discussion_r904705872


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HeartBeat.java:
##########
@@ -26,22 +26,22 @@ public class HeartBeat {
 
     private static final Logger logger = LoggerFactory.getLogger(HeartBeat.class);
 
-    private long startupTime;
-    private long reportTime;
-    private double cpuUsage;
-    private double memoryUsage;
-    private double loadAverage;
-    private double availablePhysicalMemorySize;
-    private double maxCpuloadAvg;
-    private double reservedMemory;
-    private int serverStatus;
-    private int processId;
-
-    private int workerHostWeight; // worker host weight
-    private int workerWaitingTaskCount; // worker waiting task count
-    private int workerExecThreadCount; // worker thread pool thread count
-
-    private double diskAvailable;
+    protected long startupTime;
+    protected long reportTime;
+    protected double cpuUsage;
+    protected double memoryUsage;
+    protected double loadAverage;
+    protected double availablePhysicalMemorySize;
+    protected double maxCpuloadAvg;
+    protected double reservedMemory;
+    protected int serverStatus;
+    protected int processId;
+
+    protected int workerHostWeight; // worker host weight
+    protected int workerWaitingTaskCount; // worker waiting task count
+    protected int workerExecThreadCount; // worker thread pool thread count

Review Comment:
   I think these attributes should be a part of  `HeartBeat`, but only apply to `WorkerHeartBeat`. 
   The advantage is that the processing of `HeartBeat` is consistent, like `decodeHeartBeat`



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org