tillrohrmann commented on a change in pull request #8373:
[FLINK-11922][metrics] Support MetricReporter factories
URL: https://github.com/apache/flink/pull/8373#discussion_r282396565
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/ReporterSetup.java
##########
@@ -131,46 +137,119 @@ private static ReporterSetup createReporterSetup(String
reporterName, MetricConf
}
}
- List<Tuple2<String, Configuration>> reporterConfigurations;
-
if (namedReporters.isEmpty()) {
- reporterConfigurations = Collections.emptyList();
- } else {
- reporterConfigurations = new
ArrayList<>(namedReporters.size());
+ return Collections.emptyList();
+ }
- for (String namedReporter: namedReporters) {
- DelegatingConfiguration delegatingConfiguration
= new DelegatingConfiguration(
- configuration,
- ConfigConstants.METRICS_REPORTER_PREFIX
+ namedReporter + '.');
+ List<Tuple2<String, Configuration>> reporterConfigurations =
new ArrayList<>(namedReporters.size());
-
reporterConfigurations.add(Tuple2.of(namedReporter, (Configuration)
delegatingConfiguration));
- }
+ for (String namedReporter: namedReporters) {
+ DelegatingConfiguration delegatingConfiguration = new
DelegatingConfiguration(
+ configuration,
+ ConfigConstants.METRICS_REPORTER_PREFIX +
namedReporter + '.');
+
+ reporterConfigurations.add(Tuple2.of(namedReporter,
(Configuration) delegatingConfiguration));
Review comment:
The cast should not be necessary.
----------------------------------------------------------------
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