You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/11/06 03:35:41 UTC

[GitHub] [flink] zhuzhurk commented on a change in pull request #10082: [FLINK-14164][runtime] Add a meter ‘numberOfRestarts’ to show number of restarts as well as its rate

zhuzhurk commented on a change in pull request #10082: [FLINK-14164][runtime] Add a meter ‘numberOfRestarts’ to show number of restarts as well as its rate
URL: https://github.com/apache/flink/pull/10082#discussion_r342904050
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -193,6 +197,11 @@ public SchedulerBase(
 		this.failoverTopology = executionGraph.getFailoverTopology();
 
 		this.inputsLocationsRetriever = new ExecutionGraphToInputsLocationsRetrieverAdapter(executionGraph);
+
+		// Use the counter from execution graph to avoid modifying execution graph interfaces
+		// Can be a new SimpleCounter created here after the legacy scheduler is removed.
+		this.numberOfRestartsCounter = executionGraph.getNumberOfRestartsCounter();
 
 Review comment:
   The existing `numberOfFullRestarts` metric also counts cancel() and suspend() as a restart.
   But agreed it's better to not retain that behavior and only counts those really happening restarts.
   Will take another option that creates the `numberOfRestartsCounter` in `SchedulerBase` and set it to `ExecutionGraph`.

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


With regards,
Apache Git Services