@Override
  public void setProperty(String id, Object value) {
    String categoryKey = getCategoryKey(PropertyHelper.getPropertyCategory(id));

    Map<String, Object> properties = propertiesMap.get(categoryKey);
    if (properties == null) {
      properties = Collections.synchronizedMap(new TreeMap<String, Object>());
      propertiesMap.put(categoryKey, properties);
    }
    properties.put(PropertyHelper.getPropertyName(id), value);
  }
Construct a resource from the given resource, setting only the properties
that are found in the given set of property and category ids.

@param resource    the resource to copy
@param propertyIds the set of requested property and category ids
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java