StefanRRichter commented on a change in pull request #6702: [FLINK-10135] The
JobManager does not report the cluster-level metrics
URL: https://github.com/apache/flink/pull/6702#discussion_r218461569
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
##########
@@ -467,6 +467,22 @@ private JobManagerRunner
startJobManagerRunner(JobManagerRunner jobManagerRunner
});
}
+ @Override
+ public CompletableFuture<JobsOverview> requestMultipleJobsOverview(Time
timeout) {
+ final List<CompletableFuture<Optional<JobStatus>>>
optionalJobInformation = queryJobMastersForInformation(
+ (JobMasterGateway jobMasterGateway) ->
jobMasterGateway.requestJobStatus(timeout));
+
+ CompletableFuture<Collection<Optional<JobStatus>>>
allOptionalJobsFuture = FutureUtils.combineAll(optionalJobInformation);
+
+ CompletableFuture<Collection<JobStatus>> allJobsFuture =
allOptionalJobsFuture.thenApply(this::flattenOptionalCollection);
Review comment:
I would simplify as
```
return allOptionalJobsFuture
.thenApply(this::flattenOptionalCollection)
.thenApply(JobsOverview::create);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services