Search in sources :

Example 6 with ConfigProvider

use of org.apache.kafka.common.config.provider.ConfigProvider in project kafka by apache.

the class Worker method initConfigTransformer.

private WorkerConfigTransformer initConfigTransformer() {
    final List<String> providerNames = config.getList(WorkerConfig.CONFIG_PROVIDERS_CONFIG);
    Map<String, ConfigProvider> providerMap = new HashMap<>();
    for (String providerName : providerNames) {
        ConfigProvider configProvider = plugins.newConfigProvider(config, WorkerConfig.CONFIG_PROVIDERS_CONFIG + "." + providerName, ClassLoaderUsage.PLUGINS);
        providerMap.put(providerName, configProvider);
    }
    return new WorkerConfigTransformer(this, providerMap);
}
Also used : ConfigProvider(org.apache.kafka.common.config.provider.ConfigProvider) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap)

Aggregations

ConfigProvider (org.apache.kafka.common.config.provider.ConfigProvider)6 HashMap (java.util.HashMap)4 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 HashSet (java.util.HashSet)1 Set (java.util.Set)1 TreeMap (java.util.TreeMap)1 ConfigTransformer (org.apache.kafka.common.config.ConfigTransformer)1 FileConfigProvider (org.apache.kafka.common.config.provider.FileConfigProvider)1 ConnectException (org.apache.kafka.connect.errors.ConnectException)1 Test (org.junit.Test)1