public Map<String, PropertyMap> selectProperties(String namePrefix, Function<PropertyMap, PropertyMap> selector) {
    final String mapKey = mapKey(namePrefix);
    final Map<String, PropertyMap> selected = store.selectProperties(mapKey,null, k->schemaOf(splitKey(k)) );
    final Map<String, PropertyMap> maps = new TreeMap<>();
    final Function<PropertyMap, PropertyMap> transform = selector == null? Function.identity() : selector;
    selected.forEach((k, p) -> {
      final PropertyMap dirtyMap = dirtyMaps.get(k);
      final PropertyMap map = transform.apply(dirtyMap == null ? p.copy() : dirtyMap.copy());
      if (map != null && !map.isEmpty()) {
        maps.put(mapName(k), map);
      }
    });
    // apply to new (dirty) maps
    dirtyMaps.forEach((k, p) -> {
      // exclude selected (updated) maps that were handled above
      if (k.startsWith(mapKey) && !selected.containsKey(k)) {
        final PropertyMap map = transform.apply(p.copy());
        if (map != null && !map.isEmpty()) {
          maps.put(mapName(k), map);
        }
      }
    });
    return maps;
  }
Selects a set of properties.
@param namePrefix the map name prefix
@param selector the selector/transformer function
@return the map of property maps keyed by their name
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyManager.java