[ 
https://issues.apache.org/jira/browse/FLINK-11424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16750921#comment-16750921
 ] 

Chesnay Schepler commented on FLINK-11424:
------------------------------------------

Because a gauge that throws exceptions is probably fundamentally broken and 
will just fail again and again, and hence should be ignored in further 
reporters. The code fails when doing so, but the intended behavior is correct.

> org.apache.flink.metrics.datadog.DatadogHttpReporter#report remove will throw 
> exception
> ---------------------------------------------------------------------------------------
>
>                 Key: FLINK-11424
>                 URL: https://issues.apache.org/jira/browse/FLINK-11424
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>            Reporter: lining
>            Assignee: lining
>            Priority: Major
>
> {code:java}
> for (Map.Entry<Gauge, DGauge> entry : gauges.entrySet()) {
>    DGauge g = entry.getValue();
>    try {
>       // Will throw exception if the Gauge is not of Number type
>       // Flink uses Gauge to store many types other than Number
>       g.getMetricValue();
>       request.addGauge(g);
>    } catch (Exception e) {
>       // Remove that Gauge if it's not of Number type
>       gauges.remove(entry.getKey());
>    }
> }
> {code}
> in this method remove will java.util.ConcurrentModificationException



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to