tillrohrmann commented on a change in pull request #8373:
[FLINK-11922][metrics] Support MetricReporter factories
URL: https://github.com/apache/flink/pull/8373#discussion_r282392974
##########
File path:
flink-metrics/flink-metrics-jmx/src/main/java/org/apache/flink/metrics/jmx/JMXReporter.java
##########
@@ -122,13 +115,24 @@ public void open(MetricConfig config) {
}
}
}
- if (jmxServer == null) {
- throw new RuntimeException("Could not start JMX
server on any configured port. Ports: " + portsConfig);
+ if (successfullyStartedServer == null) {
+ throw new RuntimeException("Could not start JMX
server on any configured port. Ports: " + portsConfig.get());
}
+ this.jmxServer = successfullyStartedServer;
+ } else {
+ this.jmxServer = null;
}
LOG.info("Configured JMXReporter with {port:{}}", portsConfig);
Review comment:
Shouldn't we only log the port if we actually started a `JMXServer`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services