protected void updatePropertyInfoMap(String componentName, String propertyId, Map<String, PropertyInfo> propertyInfoMap) {
    Map<String, PropertyInfo> componentMetricMap = getComponentMetrics().get(componentName);

    propertyInfoMap.clear();

    if (componentMetricMap == null) {
      return;
    }

    PropertyInfo propertyInfo = componentMetricMap.get(propertyId);
    if (propertyInfo != null) {
      propertyInfoMap.put(propertyId, propertyInfo);
      return;
    }

    Map.Entry<String, Pattern> regexEntry = getRegexEntry(propertyId);

    if (regexEntry != null) {
      String regexKey = regexEntry.getKey();
      propertyInfo = componentMetricMap.get(regexKey);
      if (propertyInfo != null) {
        propertyInfoMap.put(regexKey, propertyInfo);
        return;
      }
    }

    if (!propertyId.endsWith("/")) {
      propertyId += "/";
    }

    for (Map.Entry<String, PropertyInfo> entry : componentMetricMap.entrySet()) {
      if (entry.getKey().startsWith(propertyId)) {
        String key = entry.getKey();
        propertyInfoMap.put(key, entry.getValue());
      }
    }

    if (regexEntry != null) {
      // in the event that a category is being requested, the pattern must
      // match all child properties; append \S* for this
      String regexPattern = regexEntry.getValue().pattern();
      regexPattern += "(\\S*)";

      for (Map.Entry<String, PropertyInfo> entry : componentMetricMap.entrySet()) {
        if (entry.getKey().matches(regexPattern)) {
          propertyInfoMap.put(entry.getKey(), entry.getValue());
        }
      }
    }

    return;
  }
Get a map of metric / property info based on the given component name and property id.
Note that the property id may map to multiple metrics if the property id is a category.

@param componentName  the component name
@param propertyId     the property id; may be a category

@return a map of metrics
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java