Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4802#discussion_r144005254
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
---
@@ -192,6 +196,18 @@ public String cancelWithSavepoint(JobID jobId,
@Nullable String savepointDirecto
.thenApply(response -> response.location);
}
+ @Override
+ public CompletableFuture<Collection<JobDetails>> listJobs() throws
Exception {
+ CurrentJobsOverviewHandlerHeaders headers =
CurrentJobsOverviewHandlerHeaders.getInstance();
+ CompletableFuture<MultipleJobsDetails> jobDetailsFuture =
restClient.sendRequest(
+ restClusterClientConfiguration.getRestServerAddress(),
+ restClusterClientConfiguration.getRestServerPort(),
+ headers
+ );
+ return jobDetailsFuture
+ .thenApply(MultipleJobsDetails::getRunning);
--- End diff --
I think we also have to return the list of completed jobs not only the
running.
---