@Override
  public RequestStatus update(ResourceInstance resource, RequestBody requestBody)
      throws UnsupportedPropertyException, SystemException, NoSuchParentResourceException, NoSuchResourceException {

    if (!AuthorizationHelper.isAuthorized(ResourceType.CLUSTER, null,
            EnumSet.of(RoleAuthorization.CLUSTER_MANAGE_USER_PERSISTED_DATA))) {
      throw new AuthorizationException("The authenticated user does not have authorization " +
              "to update/store user persisted data.");
    }

    Map<Resource.Type, String> mapResourceIds = resource.getKeyValueMap();
    Resource.Type type = resource.getResourceDefinition().getType();
    Schema schema = m_controller.getSchema(type);

    Set<NamedPropertySet> setProperties = requestBody.getNamedPropertySets();

    for (NamedPropertySet propertySet : setProperties) {
      for (Map.Entry<Resource.Type, String> entry : mapResourceIds.entrySet()) {
        if (entry.getValue() != null) {
          Map<String, Object> mapProperties = propertySet.getProperties();
          String property = schema.getKeyPropertyId(entry.getKey());
          if (!mapProperties.containsKey(property)) {
            mapProperties.put(property, entry.getValue());
          }
        }
      }
    }

    return m_controller.updateResources(type, createControllerRequest(requestBody), resource.getQuery().getPredicate());
  }
Constructor.

@param controller  the cluster controller
ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java