zhuzhurk 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_r343499645
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
##########
@@ -140,6 +143,7 @@
private final Time slotRequestTimeout;
+ private final Counter numberOfRestartsCounter;
Review comment:
If we can have the conclusion to not support the meter, I'd prefer to use a
gauge which can make the change simpler. If a meter `numberOfRestartsPerSecond`
need to be introduced, a counter will be simpler since it can be the underlying
data source of a MeterView.
A gauge cannot be used by a meter since meter has write interfaces
`marEvent(...)` while `Gauge` is readonly. An alternative is to introduce a
ReadOnlyMeterView which does not allow invocation of `marEvent(...)`.
----------------------------------------------------------------
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