github-advanced-security[bot] commented on code in PR #15439:
URL: 
https://github.com/apache/dolphinscheduler/pull/15439#discussion_r1444329806


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/AlertServerHeartBeat.java:
##########
@@ -33,7 +35,9 @@
     private long reportTime;
     private double cpuUsage;
     private double memoryUsage;
-    private double availablePhysicalMemorySize;
+    private double jvmMemoryUsage;
+
+    private ServerStatus serverStatus;

Review Comment:
   ## Missing Override annotation
   
   This method overrides [HeartBeat.getServerStatus](1); it is advisable to add 
an Override annotation.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/3866)



##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/task/WorkerHeartBeatTask.java:
##########
@@ -38,43 +40,38 @@
     private final WorkerConfig workerConfig;
     private final RegistryClient registryClient;
 
-    private final Supplier<Integer> workerWaitingTaskCount;
+    private final MetricsProvider metricsProvider;
+    private final WorkerTaskExecutorThreadPool workerTaskExecutorThreadPool;
 
     private final int processId;
 
     public WorkerHeartBeatTask(@NonNull WorkerConfig workerConfig,
+                               @NonNull MetricsProvider metricsProvider,
                                @NonNull RegistryClient registryClient,
-                               @NonNull Supplier<Integer> 
workerWaitingTaskCount) {
-        super("WorkerHeartBeatTask", 
workerConfig.getHeartbeatInterval().toMillis());
+                               @NonNull WorkerTaskExecutorThreadPool 
workerTaskExecutorThreadPool) {
+        super("WorkerHeartBeatTask", 
workerConfig.getMaxHeartbeatInterval().toMillis());

Review Comment:
   ## Dereferenced variable may be null
   
   Variable [workerConfig](1) may be null at this access as suggested by 
[this](2) null guard.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/3870)



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/task/MasterHeartBeatTask.java:
##########
@@ -35,33 +38,38 @@
 
     private final MasterConfig masterConfig;
 
+    private final MetricsProvider metricsProvider;
+
     private final RegistryClient registryClient;
 
     private final String heartBeatPath;
 
     private final int processId;
 
     public MasterHeartBeatTask(@NonNull MasterConfig masterConfig,
+                               @NonNull MetricsProvider metricsProvider,
                                @NonNull RegistryClient registryClient) {
-        super("MasterHeartBeatTask", 
masterConfig.getHeartbeatInterval().toMillis());
+        super("MasterHeartBeatTask", 
masterConfig.getMaxHeartbeatInterval().toMillis());

Review Comment:
   ## Dereferenced variable may be null
   
   Variable [masterConfig](1) may be null at this access as suggested by 
[this](2) null guard.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/3869)



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

Reply via email to