protected Set<Map<String, Object>> getPropertyMaps(Map<String, Object> requestPropertyMap, Predicate givenPredicate)
      throws UnsupportedPropertyException, SystemException, NoSuchResourceException, NoSuchParentResourceException {

    Set<Map<String, Object>> propertyMaps = new HashSet<>();

    // If the predicate specifies a unique resource then we can simply return a single
    // property map for the update.  Otherwise we need to do a get with the given predicate
    // to get the set of property maps for the resources that need to be updated.
    if (specifiesUniqueResource(givenPredicate)) {
      Map<String, Object> propertyMap = new HashMap<>(PredicateHelper.getProperties(givenPredicate));
      propertyMap.putAll(requestPropertyMap);
      propertyMaps.add(propertyMap);
    } else {
      for (Resource resource : getResources(givenPredicate)) {
        Map<String, Object> propertyMap = new HashMap<>(PropertyHelper.getProperties(resource));
        propertyMap.putAll(requestPropertyMap);
        propertyMaps.add(propertyMap);
      }
    }
    return propertyMaps;
  }
Get a set of properties from the given property map and predicate.  The
returned set of property/value mappings is required to generate update
requests to the back end which does not deal with Predicates.  Note that
the single property map & predicate can result in multiple backend requests.

@param requestPropertyMap  the request update properties; may not be null
@param givenPredicate      the predicate

@return the set of properties used to build request objects
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java