jerryshao commented on code in PR #12522:
URL: https://github.com/apache/gravitino/pull/12522#discussion_r3820136221
##########
common/src/main/java/org/apache/gravitino/dto/responses/JobListResponse.java:
##########
@@ -33,19 +34,27 @@ public class JobListResponse extends BaseResponse {
@JsonProperty("jobs")
private final List<JobDTO> jobs;
+ @JsonProperty("statusCounts")
+ private final Map<String, Long> statusCounts;
+
/**
- * Creates a new JobListResponse with the specified list of jobs.
+ * Creates a new JobListResponse with the specified list of jobs and
per-status counts.
*
* @param jobs The list of jobs to include in the response.
+ * @param statusCounts The number of jobs in {@code jobs}, keyed by
lower-case status name (e.g.
+ * "queued", "started"), with every {@link
org.apache.gravitino.job.JobHandle.Status} value
+ * present even when its count is zero. May be {@code null} when
deserialized from an older
+ * server that predates this field.
*/
- public JobListResponse(List<JobDTO> jobs) {
Review Comment:
Good catch — restored the original single-arg constructor (delegating to the
new two-arg one with statusCounts=null) alongside it, so existing callers
aren't forced to change.
--
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]