flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnowojski <...@git.apache.org>
Subject [GitHub] flink pull request #4908: [FLINK-7933][metrics] Improve PrometheusReporter t...
Date Fri, 27 Oct 2017 09:01:20 GMT
Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4908#discussion_r147357330
  
    --- Diff: flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java
---
    @@ -70,9 +69,25 @@
     	@Rule
     	public ExpectedException thrown = ExpectedException.none();
     
    -	private final MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.fromConfiguration(createConfigWithOneReporter("test1",
"" + NON_DEFAULT_PORT)));
    -	private final FrontMetricGroup<TaskManagerMetricGroup> metricGroup = new FrontMetricGroup<>(0,
new TaskManagerMetricGroup(registry, HOST_NAME, TASK_MANAGER));
    -	private final MetricReporter reporter = registry.getReporters().get(0);
    +	private MetricRegistry registry;
    +	private FrontMetricGroup<TaskManagerMetricGroup> metricGroup;
    +	private PrometheusReporter reporter;
    +	private int port;
    --- End diff --
    
    do we need this extra field for that? Can't we access `reporter.getPort()`? Isn't it redundant?


---

Mime
View raw message