zentol 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_r343107404
##########
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:
That's a bit of a can of worms.
In my mind, the different metric types are purely syntactic sugar, offering
convenience APIs for modifying/retrieving data. As in, conceptually, everything
is a gauge.
However, several reporters map metrics based on their class to types that
the external system supports. That very metric type is used by certain systems
to derive what kind of operations/features are applicable for a given metric.
Thus, a gauge (due to being the most general metric type) can potentially be
less useful to a user than a counter.
We haven't truly reached a conclusive stance on the matter; ultimately we
should either force all reporters to report metrics as if they were gauges, or
decouple the interface (gauge/metric/histogram) from the semantic (arbitrary
value, value that only increments, rates).
----------------------------------------------------------------
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