public static List<ConfigurationRequest> getConfigurationRequests(String parentCategory, Map<String, Object> properties) {

    List<ConfigurationRequest> configs = new LinkedList<>();

    String desiredConfigKey = parentCategory + "/desired_config";
    // Multiple configs to be updated
    if (properties.containsKey(desiredConfigKey)
      && properties.get(desiredConfigKey) instanceof Set) {

      Set<Map<String, Object>> configProperties =
        (Set<Map<String, Object>>) properties.get(desiredConfigKey);
      for (Map<String, Object> value: configProperties) {
        ConfigurationRequest newConfig = new ConfigurationRequest();

        for (Entry<String, Object> e : value.entrySet()) {
          String propName =
            PropertyHelper.getPropertyName(desiredConfigKey + '/' + e.getKey());
          String absCatategory =
            PropertyHelper.getPropertyCategory(desiredConfigKey + '/' + e.getKey());
          parseProperties(newConfig, absCatategory, propName, e.getValue() == null ? null : e.getValue().toString());
        }
        configs.add(newConfig);
      }
      return configs;
    }

    ConfigurationRequest config = null;
    // as a convenience, allow consumers to specify name/value overrides in this
    // call instead of forcing a cluster call to do that work
    for (Entry<String, Object> entry : properties.entrySet()) {
      String absCategory = PropertyHelper.getPropertyCategory(entry.getKey());
      String propName = PropertyHelper.getPropertyName(entry.getKey());

      if (absCategory != null && absCategory.startsWith(desiredConfigKey)) {
        config = (null == config) ? new ConfigurationRequest() : config;
        if(entry.getValue() != null) {
          parseProperties(config, absCategory, propName, entry.getValue().toString());
        }
      }
    }
    if (config != null) {
      configs.add(config);
    }
    return configs;
  }
Helper method to get a configuration request, if one exists.
@param parentCategory  the parent category name.  Checks for a property
   whose category is the parent and marked as a desired config.
@param properties  the properties on the request.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java