HuangZhenQiu commented on a change in pull request #7356: 
[FLINK-10868][flink-yarn] Enforce maximum failed TMs in YarnResourceManager
URL: https://github.com/apache/flink/pull/7356#discussion_r251273506
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ##########
 @@ -825,6 +843,12 @@ protected void closeTaskManagerConnection(final 
ResourceID resourceID, final Exc
                        
slotManager.unregisterTaskManager(workerRegistration.getInstanceID());
 
                        
workerRegistration.getTaskExecutorGateway().disconnectResourceManager(cause);
+                       failedContainerSoFar.getAndAdd(1);
+                       if (failedContainerSoFar.intValue() >= 
maximumAllowedTaskManagerFailureCount) {
+                               rejectAllPendingSlotRequests(new 
MaximumFailedTaskManagerExceedingException(
+                                       String.format("Maximum number of failed 
container %d "
+                                               + "is detected in Resource 
Manager", failedContainerSoFar.intValue())));
+                       }
 
 Review comment:
   Agree. Removed.

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