KarmaGYZ commented on a change in pull request #15145:
URL: https://github.com/apache/flink/pull/15145#discussion_r592256230



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/ClusterResourceOverview.java
##########
@@ -80,4 +84,10 @@ public ResourceProfile getFreeResourceOf(InstanceID 
instanceId) {
                 .map(TaskManagerInfo::getAvailableResource)
                 .orElse(ResourceProfile.ZERO);
     }
+
+    public ResourceProfile getPendingResource() {

Review comment:
       The total pending/registered resource will be calculated each time a 
task manager registered and a pending task manager added. I think it would be 
good to cache the result in `TaskManagerTracker`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to