public void linkResourceToMetric(String componentName, String metric) {
      if (componentMetricMap.get(componentName) == null) {
        componentMetricMap.put(componentName, new HashSet<>(Arrays.asList(metric)));
      } else {
        componentMetricMap.get(componentName).add(metric);
      }
    }
Populate the associated resources by making a call to the Metrics
service.

@return a collection of populated resources
@throws SystemException if unable to populate the resources
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java