zentol commented on code in PR #21300:
URL: https://github.com/apache/flink/pull/21300#discussion_r1027885797
##########
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:
Does that matter for visibility? if the test wouldn't exist it'd be private;
the JsonCreator constructor doesn't change that?
--
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]