Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3398#discussion_r104154083
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
    @@ -252,10 +274,14 @@ public void onContainersAllocated(List<Container> 
containers) {
                                // failed to launch the container, will release 
the failed one and ask for a new one
                                LOG.error("Could not start TaskManager in 
container {},", container, t);
                                
resourceManagerClient.releaseAssignedContainer(container.getId());
    -                           requestYarnContainer(container.getResource(), 
container.getPriority());
    +                           requestYarnContainer(container.getResource(), 
priority);
                        }
                }
    -           if (numPendingContainerRequests <= 0) {
    +           int pendingRequest = 0;
    +           for (int num : numPendingContainerRequests.values()) {
    +                   pendingRequest += num;
    +           }
    --- End diff --
    
    This does not look efficient. Why not having a global counter across all 
different requests?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to