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

    https://github.com/apache/flink/pull/2105#discussion_r68036072
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/metrics/MetricRegistry.java ---
    @@ -86,11 +88,11 @@ public MetricRegistry(Configuration config) {
                        // by default, create JMX metrics
                        LOG.info("No metrics reporter configured, exposing 
metrics via JMX");
                        this.reporter = new JMXReporter();
    -                   this.timer = null;
    +                   this.executor = null;
                }
                else {
                        MetricReporter reporter;
    -                   java.util.Timer timer;
    +                   ScheduledExecutorService executor = 
Executors.newSingleThreadScheduledExecutor();
    --- End diff --
    
    Why not instantiating the `ScheduledExecutorService` when we know that the 
`MetricReporter` is of type `Scheduled`?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to