Search in sources :

Example 6 with ConfigEntry

use of co.cask.cdap.proto.ConfigEntry in project cdap by caskdata.

the class ConfigService method toConfigEntries.

private List<ConfigEntry> toConfigEntries(CConfiguration configuration) {
    List<ConfigEntry> result = Lists.newArrayList();
    for (Map.Entry<String, String> entry : configuration) {
        String source = getFirstElement(configuration.getPropertySources(entry.getKey()));
        result.add(new ConfigEntry(entry.getKey(), entry.getValue(), source));
    }
    return result;
}
Also used : ConfigEntry(co.cask.cdap.proto.ConfigEntry) Map(java.util.Map)

Aggregations

ConfigEntry (co.cask.cdap.proto.ConfigEntry)6 Map (java.util.Map)2 Test (org.junit.Test)2 CConfiguration (co.cask.cdap.common.conf.CConfiguration)1 Version (co.cask.cdap.proto.Version)1 HttpResponse (co.cask.common.http.HttpResponse)1 TypeToken (com.google.common.reflect.TypeToken)1 StringReader (java.io.StringReader)1 ReaderInputStream (org.apache.commons.io.input.ReaderInputStream)1 Configuration (org.apache.hadoop.conf.Configuration)1