use of org.apache.kafka.common.config.ConfigTransformer in project kafka by apache.
the class MirrorMakerConfig method transform.
Map<String, String> transform(Map<String, String> props) {
// transform worker config according to config.providers
List<String> providerNames = configProviders();
Map<String, ConfigProvider> providers = new HashMap<>();
for (String name : providerNames) {
ConfigProvider configProvider = plugins.newConfigProvider(this, CONFIG_PROVIDERS_CONFIG + "." + name, Plugins.ClassLoaderUsage.PLUGINS);
providers.put(name, configProvider);
}
ConfigTransformer transformer = new ConfigTransformer(providers);
Map<String, String> transformed = transformer.transform(props).data();
providers.values().forEach(x -> Utils.closeQuietly(x, "config provider"));
return transformed;
}
Aggregations