Browse Source

[Fix][Monitor]Monitor UI not show DisakAvailable and MemoryUsage correctly (#11870)

3.1.0-release
LiuBodong 2 years ago committed by caishunfeng
parent
commit
0f3b42925f
  1. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/MasterHeartBeat.java
  2. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerHeartBeat.java
  3. 2
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/task/MasterHeartBeatTask.java
  4. 2
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/task/WorkerHeartBeatTask.java

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/MasterHeartBeat.java

@ -35,5 +35,6 @@ public class MasterHeartBeat implements HeartBeat {
private double availablePhysicalMemorySize;
private double maxCpuloadAvg;
private double reservedMemory;
private double diskAvailable;
private int processId;
}

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerHeartBeat.java

@ -36,6 +36,7 @@ public class WorkerHeartBeat implements HeartBeat {
private double availablePhysicalMemorySize;
private double maxCpuloadAvg;
private double reservedMemory;
private double diskAvailable;
private int serverStatus;
private int processId;

2
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/task/MasterHeartBeatTask.java

@ -57,6 +57,8 @@ public class MasterHeartBeatTask extends BaseHeartBeatTask<MasterHeartBeat> {
.availablePhysicalMemorySize(OSUtils.availablePhysicalMemorySize())
.maxCpuloadAvg(masterConfig.getMaxCpuLoadAvg())
.reservedMemory(masterConfig.getReservedMemory())
.memoryUsage(OSUtils.memoryUsage())
.diskAvailable(OSUtils.diskAvailable())
.processId(processId)
.build();
}

2
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/task/WorkerHeartBeatTask.java

@ -68,7 +68,9 @@ public class WorkerHeartBeatTask extends BaseHeartBeatTask<WorkerHeartBeat> {
.loadAverage(loadAverage)
.availablePhysicalMemorySize(availablePhysicalMemorySize)
.maxCpuloadAvg(maxCpuLoadAvg)
.memoryUsage(OSUtils.memoryUsage())
.reservedMemory(reservedMemory)
.diskAvailable(OSUtils.diskAvailable())
.processId(processId)
.workerHostWeight(workerConfig.getHostWeight())
.workerWaitingTaskCount(this.workerWaitingTaskCount.get())

Loading…
Cancel
Save