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_r258505911
 
 

 ##########
 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 the changes are not properly tested. Otherwise 
`onContainersCompleted` should have been caught. Please add the relevant test 
cases.

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

Reply via email to