Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2134#discussion_r68265180
--- Diff:
flink-core/src/main/java/org/apache/flink/metrics/groups/AbstractMetricGroup.java
---
@@ -146,7 +147,16 @@ public Counter counter(int name) {
@Override
public Counter counter(String name) {
- Counter counter = new Counter();
+ return counter(name, new SimpleCounter());
+ }
+
+ @Override
+ public <C extends Counter> C counter(int name, C counter) {
--- End diff --
Ah true. Good idea :-) Maybe we should change it for the `gauge` and
`histogram` functions as well.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---