yanghua 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_r223673598
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -734,6 +744,18 @@ public void requestHeartbeat(ResourceID resourceID, Void
payload) {
}
}
+ private void registerSlotAndTaskExecutorMetrics() {
+ jobManagerMetricGroup.gauge(
+ TASK_SLOTS_AVAILABLE_METRIC_NAME,
+ () -> (long) slotManager.getNumberFreeSlots());
Review comment:
@zentol There may be problems with read inconsistencies here. But I think
the impact is small:
* If RM and Dispatcher are single-threaded, there will be no concurrent
modification problems here;
* The indicator is periodically extracted (inconsistent is only a short
period of one cycle) and its value does not play any decision role in Flink
(should be tolerable?)
* Considering the frequency of metric extraction, if we provide related
synchronization mechanisms, performance will be reduced and complexity will be
increased.
What do you think?
----------------------------------------------------------------
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