Example usage for org.apache.commons.configuration ConfigurationMap entrySet

List of usage examples for org.apache.commons.configuration ConfigurationMap entrySet

Introduction

In this page you can find the example usage for org.apache.commons.configuration ConfigurationMap entrySet.

Prototype

public Set entrySet() 

Source Link

Document

Returns a set with the entries contained in this configuration-based map.

Usage

From source file:com.linkedin.pinot.routing.PercentageBasedRoutingTableSelector.java

public void init(Configuration configuration) {
    try {/*from   ww w.jav  a2s .  com*/
        Configuration tablesConfig = configuration.subset(TABLE_KEY);
        if (tablesConfig == null || tablesConfig.isEmpty()) {
            LOGGER.info("No specific table configuration. Using 0% LLC for all tables");
            return;
        }
        ConfigurationMap cmap = new ConfigurationMap(tablesConfig);
        Set<Map.Entry<String, Integer>> mapEntrySet = cmap.entrySet();
        for (Map.Entry<String, Integer> entry : mapEntrySet) {
            LOGGER.info("Using {} percent LLC routing for table {}", entry.getValue(), entry.getKey());
            _percentMap.put(entry.getKey(), entry.getValue());
        }
    } catch (Exception e) {
        LOGGER.warn("Could not parse get config for {}. Using no LLC routing", TABLE_KEY, e);
    }
}