@Override
  public Set<Resource> populateResources(Set<Resource> resources,
                Request request, Predicate predicate) throws SystemException {
    Set<String> ids = getRequestPropertyIds(request, predicate);
    if (ids.isEmpty()) {
      return resources;
    }

    if (!checkAuthorizationForMetrics(resources, clusterNamePropertyId)) {
      return resources;
    }

    // Re-initialize in case of reuse.
    metricsPaddingMethod = DEFAULT_PADDING_METHOD;

    Set<String> requestPropertyIds = request.getPropertyIds();
    if (requestPropertyIds != null && !requestPropertyIds.isEmpty()) {
      for (String propertyId : requestPropertyIds) {
        if (propertyId.startsWith(ZERO_PADDING_PARAM)) {
          String paddingStrategyStr = propertyId.substring(ZERO_PADDING_PARAM.length() + 1);
          metricsPaddingMethod = new MetricsPaddingMethod(
            MetricsPaddingMethod.PADDING_STRATEGY.valueOf(paddingStrategyStr));
        }
      }
    }

    return populateResourcesWithProperties(resources, request, ids);
  }
Get the component name for the given resource.

@param resource  the resource

@return the component name
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java