XComp commented on code in PR #21300:
URL: https://github.com/apache/flink/pull/21300#discussion_r1027615498


##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java:
##########
@@ -93,6 +92,29 @@ public class JobDetails implements Serializable {
      */
     private final Map<String, Map<Integer, CurrentAttempts>> 
currentExecutionAttempts;
 
+    @JsonCreator
+    public JobDetails(
+            @JsonProperty(FIELD_NAME_JOB_ID) @JsonDeserialize(using = 
JobIDDeserializer.class)
+                    JobID jobId,
+            @JsonProperty(FIELD_NAME_JOB_NAME) String jobName,
+            @JsonProperty(FIELD_NAME_START_TIME) long startTime,
+            @JsonProperty(FIELD_NAME_END_TIME) long endTime,
+            @JsonProperty(FIELD_NAME_DURATION) long duration,
+            @JsonProperty(FIELD_NAME_STATUS) JobStatus status,
+            @JsonProperty(FIELD_NAME_LAST_MODIFICATION) long lastUpdateTime,
+            @JsonProperty(FIELD_NAME_TASKS) Map<String, Integer> taskInfo) {
+        this(
+                jobId,
+                jobName,
+                startTime,
+                endTime,
+                duration,
+                status,
+                lastUpdateTime,
+                extractNumTasksPerState(taskInfo),
+                taskInfo.get(FIELD_NAME_TOTAL_NUMBER_TASKS));
+    }
+
     @VisibleForTesting

Review Comment:
   ```suggestion
   ```
   This is not true anymore since you're using this constructor in the 
constructor annotated with `@JsonCreator`.



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to