Search in sources :

Example 6 with ApiConfigFile

use of org.apache.ambari.api.model.ApiConfigFile in project tbd-studio-se by Talend.

the class HadoopAmbariClusterService method init.

private void init(List<String> blacklistParams) {
    confs = new HashMap<>();
    for (ApiConfigFile file : configFiles) {
        String type = file.getType();
        if (!type.endsWith(SUPPORT_FILE)) {
            continue;
        }
        Configuration conf = new Configuration(false);
        Map<String, String> properties = file.getProperties();
        for (String key : properties.keySet()) {
            if (blacklistParams != null && blacklistParams.contains(key)) {
                continue;
            }
            conf.set(key, properties.get(key));
        }
        confs.put(type, conf);
    }
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) ApiConfigFile(org.apache.ambari.api.model.ApiConfigFile)

Aggregations

ApiConfigFile (org.apache.ambari.api.model.ApiConfigFile)6 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 ApiConfigFileList2 (org.apache.ambari.api.model.ApiConfigFileList2)2 Configuration (org.apache.hadoop.conf.Configuration)2 HadoopClusterService (org.talend.repository.hadoopcluster.configurator.HadoopClusterService)1 HadoopHostedService (org.talend.repository.hadoopcluster.configurator.HadoopHostedService)1