tillrohrmann commented on a change in pull request #7356:
[FLINK-10868][flink-yarn] Enforce maximum TMs failure rate in ResourceManagers
URL: https://github.com/apache/flink/pull/7356#discussion_r258505303
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
##########
@@ -395,12 +402,14 @@ public void onContainersAllocated(List<Container>
containers) {
nodeManagerClient.startContainer(container, taskExecutorLaunchContext);
} catch (Throwable t) {
log.error("Could not start
TaskManager in container {}.", container.getId(), t);
-
// release the failed container
workerNodeMap.remove(resourceId);
resourceManagerClient.releaseAssignedContainer(container.getId());
- // and ask for a new one
-
requestYarnContainerIfRequired();
+ log.error("Could not start
TaskManager in container {}.", container.getId(), t);
+ if (recordFailure()) {
+ // and ask for a new one
+
requestYarnContainerIfRequired();
+ }
Review comment:
I think you are missing the `onContainersCompleted` case. If a container
fails after the `startContainer` request has been sent, we won't record the
failure and always allocate a new container. That's the reason why I would like
to move this logic into the `ResourceManager` so that all container start call
will go through the same code path.
----------------------------------------------------------------
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