You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/09 10:39:15 UTC

[GitHub] [flink] zentol commented on a change in pull request #8373: [FLINK-11922][metrics] Support MetricReporter factories

zentol commented on a change in pull request #8373: [FLINK-11922][metrics] Support MetricReporter factories 
URL: https://github.com/apache/flink/pull/8373#discussion_r282431591
 
 

 ##########
 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:
   no, the purpose here is to log the parameters that have been evaluated by the reporter. If you configured a port, but the port is not listed here, you'll see the mismatch.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services