HuangZhenQiu commented on a change in pull request #8952: URL: https://github.com/apache/flink/pull/8952#discussion_r550417892
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/active/ActiveResourceManager.java ########## @@ -230,6 +271,12 @@ public void onError(Throwable exception) { onFatalError(exception); } + public static ThresholdMeter createFailureRater(Configuration configuration) { + double rate = configuration.getDouble(ResourceManagerOptions.MAXIMUM_WORKERS_FAILURE_RATE); + Preconditions.checkArgument(rate > 0, "Failure rate should be larger than 0"); + return new ThresholdMeter(rate, Duration.ofMinutes(1)); + } Review comment: It is also used in the ActiveResourceManagerTest. Probably, keeping it here will be better? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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