suez1224 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_r252039395
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -626,6 +686,44 @@ public void unRegisterInfoMessageListener(final String
address) {
}
}
+ protected void rejectAllPendingSlotRequests(Exception e) {
+ slotManager.rejectAllPendingSlotRequests(e);
+ }
+
+ protected synchronized void recordFailure() {
+ if (!checkFailureRate) {
+ return;
+ }
+ if (isFailureTimestampFull()) {
+ taskExecutorFailureTimestamps.remove();
+ }
+ taskExecutorFailureTimestamps.add(System.currentTimeMillis());
+ }
+
+ protected boolean shouldRejectRequests() {
Review comment:
the rate calculation logic here share a lot with FailureRateRestartStrategy.
Can we refactor the rate calculation code to a common class?
----------------------------------------------------------------
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