Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2134#discussion_r68255328
  
    --- 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 --
    
    users can write ```MyCounter c = metricGroup.addCounter("myC", new 
MyCounter());```


---
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.
---

Reply via email to