[
https://issues.apache.org/jira/browse/FLINK-5856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894408#comment-15894408
]
ASF GitHub Bot commented on FLINK-5856:
---------------------------------------
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?
> Need return redundant containers to yarn for yarn mode
> ------------------------------------------------------
>
> Key: FLINK-5856
> URL: https://issues.apache.org/jira/browse/FLINK-5856
> Project: Flink
> Issue Type: Bug
> Components: YARN
> Reporter: shuai.xu
> Assignee: shuai.xu
> Labels: flip-6
>
> In flip6, for flink on yarn mode, RM requests container from yarn according
> to the requirement of the JM. But the AMRMClientAsync used in yarn doesn't
> guarantee that the number of containers returned exactly equal to the number
> requested. So it need to record the number request by flink rm and return the
> redundant ones to yarn.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)