yuqi1129 commented on code in PR #12522:
URL: https://github.com/apache/gravitino/pull/12522#discussion_r3819360218
##########
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:
I suggested that we keep the original one and add a new constructor.
##########
docs/open-api/jobs.yaml:
##########
Review Comment:
L1027 uses `cancelled`.
##########
server/src/main/java/org/apache/gravitino/server/web/rest/JobOperations.java:
##########
@@ -285,13 +291,31 @@ public Response alterJobTemplate(
public Response listJobs(
@PathParam("metalake") @AuthorizationMetadata(type =
Entity.EntityType.METALAKE)
String metalake,
- @QueryParam("jobTemplateName") String jobTemplateName) {
+ @QueryParam("jobTemplateName") String jobTemplateName,
+ @QueryParam("queuedAfter") String queuedAfter,
Review Comment:
Is it possible to add a unified `JobListQueryParams queryParams` to replace
those parameters and validate them uniformly?
--
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]