ruanwenjun commented on code in PR #10563:
URL: https://github.com/apache/dolphinscheduler/pull/10563#discussion_r904709724
##########
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:
It's better to move these field to subclass, and maybe we can use directly
use Json to serialize/deserialize the heartbeat? cc @caishunfeng WDYT
--
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]