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



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManagerDriver.java
##########
@@ -435,53 +308,43 @@ private void onContainersOfResourceAllocated(Resource 
resource, List<Container>
                        numAccepted, numExcess, numPending, resource);
        }
 
-       @VisibleForTesting
-       static ResourceID getContainerResourceId(Container container) {
-               return new ResourceID(container.getId().toString(), 
container.getNodeId().toString());
+       private int getNumRequestedNotAllocatedWorkers() {
+               return 
requestResourceFutures.values().stream().mapToInt(Queue::size).sum();
+       }
+
+       private int 
getNumRequestedNotAllocatedWorkersFor(TaskExecutorProcessSpec 
taskExecutorProcessSpec) {
+               return 
requestResourceFutures.getOrDefault(taskExecutorProcessSpec, new 
LinkedList<>()).size();

Review comment:
       We indeed need an empty queue here, `Collections.emptyList()` is not fit 
this argument.




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