zhuzhurk commented on code in PR #20296:
URL: https://github.com/apache/flink/pull/20296#discussion_r929628681


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/messages/ClusterOverviewWithVersion.java:
##########
@@ -70,11 +76,20 @@ public ClusterOverviewWithVersion(
             int numTaskManagersConnected,
             int numSlotsTotal,
             int numSlotsAvailable,
+            int numTaskManagersBlocked,
+            int numSlotsBlocked,
             JobsOverview jobs1,
             JobsOverview jobs2,
             String version,
             String commitId) {
-        super(numTaskManagersConnected, numSlotsTotal, numSlotsAvailable, 
jobs1, jobs2);

Review Comment:
   Seems this method is no longer used and can be removed?
   Then we can also remove the ClusterOverview constructor it relies on, 
because that constructor is only used here.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/ClusterOverview.java:
##########
@@ -44,11 +51,21 @@ public class ClusterOverview extends JobsOverview {
     @JsonProperty(FIELD_NAME_SLOTS_AVAILABLE)
     private final int numSlotsAvailable;
 
+    @JsonProperty(FIELD_NAME_TASKMANAGERS_BLOCKED)
+    @JsonInclude(Include.NON_DEFAULT)
+    private final int numTaskManagersBlocked;
+
+    @JsonProperty(FIELD_NAME_SLOTS_BLOCKED)
+    @JsonInclude(Include.NON_DEFAULT)
+    private final int numSlotsBlocked;
+
     @JsonCreator
     public ClusterOverview(
             @JsonProperty(FIELD_NAME_TASKMANAGERS) int 
numTaskManagersConnected,
             @JsonProperty(FIELD_NAME_SLOTS_TOTAL) int numSlotsTotal,
             @JsonProperty(FIELD_NAME_SLOTS_AVAILABLE) int numSlotsAvailable,
+            @JsonProperty(FIELD_NAME_TASKMANAGERS_BLOCKED) @Nullable Integer 
numTaskManagersBlocked,
+            @JsonProperty(FIELD_NAME_SLOTS_BLOCKED) @Nullable Integer 
numSlotsBlocked,

Review Comment:
   numSlotsBlocked -> numSlotsFreeAndBlocked



##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/ClusterOverview.java:
##########
@@ -19,21 +19,28 @@
 package org.apache.flink.runtime.messages.webmonitor;
 
 import org.apache.flink.runtime.resourcemanager.ResourceOverview;
+import org.apache.flink.runtime.rest.messages.ResponseBody;
 
 import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonInclude;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonInclude.Include;
 import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
+import javax.annotation.Nullable;
+
 /**
  * Response to the {@link RequestStatusOverview} message, carrying a 
description of the Flink
  * cluster status.
  */
-public class ClusterOverview extends JobsOverview {
+public class ClusterOverview extends JobsOverview implements ResponseBody {

Review Comment:
   maybe no need to implements ResponseBody?



##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java:
##########
@@ -100,6 +129,7 @@ public JobDetails(
                 ExecutionState.values().length);
         this.tasksPerState = checkNotNull(tasksPerState);
         this.numTasks = numTasks;
+        this.currentExecutionAttempts = currentExecutionAttempts;

Review Comment:
   ```suggestion
           this.currentExecutionAttempts = 
checkNotNull(currentExecutionAttempts);
   ```



##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java:
##########
@@ -76,6 +80,8 @@ public class JobDetails implements Serializable {
 
     private final int numTasks;
 
+    private final Map<String, Map<Integer, Integer>> currentExecutionAttempts;

Review Comment:
   better to add a comment to explain what do the keys and values stand for. 
Because it's hard to reasoning at the first glance.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java:
##########
@@ -76,6 +80,8 @@ public class JobDetails implements Serializable {
 
     private final int numTasks;
 
+    private final Map<String, Map<Integer, Integer>> currentExecutionAttempts;
+
     public JobDetails(

Review Comment:
   I guess this method now is only used by tests? If so, we should mark it as 
@VisibleForTesting.



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