zentol 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_r223465173
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
##########
@@ -909,6 +926,70 @@ private void clearDispatcherState() {
terminateJobManagerRunners();
}
+ private void instantiateJobManagerOverviewMetrics(MetricGroup
jobManagerMetricGroup) {
+ long defaultTimeoutValue =
configuration.getLong(RestOptions.CONNECTION_TIMEOUT);
+ Time defaultRequestTimeout =
Time.milliseconds(defaultTimeoutValue);
+
+ jobManagerMetricGroup.gauge("taskSlotsAvailable", () -> {
+ try {
+ return (long) resourceManagerGateway
Review comment:
This method results in 3 separate RPC calls being made every time metrics
are being requested. If the dispatcher cannot reasonably provide this
information then they should be exposed at the resource manager instead.
----------------------------------------------------------------
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