GJL commented on a change in pull request #10082: [FLINK-14164][runtime] Add a 
counter ‘numberOfRestarts’ to show number of restarts
URL: https://github.com/apache/flink/pull/10082#discussion_r343086450
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandler.java
 ##########
 @@ -52,13 +56,15 @@
         * @param restartBackoffTimeStrategy helps to decide whether to restart 
failed tasks and the restarting delay
         */
        public ExecutionFailureHandler(
-               FailoverTopology<?, ?> failoverTopology,
-               FailoverStrategy failoverStrategy,
-               RestartBackoffTimeStrategy restartBackoffTimeStrategy) {
+                       final FailoverTopology<?, ?> failoverTopology,
+                       final FailoverStrategy failoverStrategy,
+                       final RestartBackoffTimeStrategy 
restartBackoffTimeStrategy,
+                       final Counter numberOfRestartsCounter) {
 
 Review comment:
   I would be in favor not to pass another dependency via the constructor. It 
would be possible to poll the value from outside the `ExecutionFailureHandler`, 
if the metric was a `Gauge`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to