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_r252360494
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
 ##########
 @@ -395,12 +405,20 @@ 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);
+                                               recordFailure();
+                                               if (shouldRejectRequests()) {
+                                                       
rejectAllPendingSlotRequests(new MaximumFailedTaskManagerExceedingException(
+                                                               
String.format("Maximum number of failed container %d in interval %s"
+                                                                               
+ "is detected in Resource Manager", maximumFailureTaskExecutorPerInternal,
+                                                                       
failureInterval.toString()), t));
 
 Review comment:
   This branch should go into the `recordFailure` method.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to