[
https://issues.apache.org/jira/browse/FLINK-4210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15378352#comment-15378352
]
Chesnay Schepler commented on FLINK-4210:
-----------------------------------------
This is actually wrong. Let's say a user calls close() on the MetricGorup
returned by the RuntimeContext. Then all operator metrics for that operator are
turned off, not just user-metrics.
Besides that, I'm mostly concerned about usability. Having a close() method in
the interface implicitly conveys "hey, this object has to be closed". But they
don't have to close it, and it will just make using them a bit unwieldy to
users who believe they have to. They would have to store it in a field, close
it on exit, check for null. All of this is unnecessary.
> Move close()/isClosed() out of MetricGroup interface
> ----------------------------------------------------
>
> Key: FLINK-4210
> URL: https://issues.apache.org/jira/browse/FLINK-4210
> Project: Flink
> Issue Type: Improvement
> Components: Metrics
> Affects Versions: 1.1.0
> Reporter: Chesnay Schepler
> Assignee: Chesnay Schepler
> Priority: Minor
> Fix For: 1.1.0
>
>
> The (user-facing) MetricGroup interface currently exposes a close() and
> isClosed() method which generally users shouldn't need to call. They are an
> internal thing, and thus should be moved into the AbstractMetricGroup class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)