zentol commented on a change in pull request #8002: [FLINK-11923][metrics]
MetricRegistryConfiguration provides MetricReporters Suppliers
URL: https://github.com/apache/flink/pull/8002#discussion_r270372947
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java
##########
@@ -144,11 +135,9 @@ public MetricRegistryImpl(MetricRegistryConfiguration
config) {
}
}
- Class<?> reporterClass =
Class.forName(className);
- MetricReporter reporterInstance =
(MetricReporter) reporterClass.newInstance();
+ final MetricReporter reporterInstance =
reporterSetup.getSupplier().get();
Review comment:
see
https://github.com/zentol/flink/commit/b5feb554a965913255c3a7f3ab94430bb37d6c52#diff-65246650592087a2e5a816275f23dcc3
----------------------------------------------------------------
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