private List<String> getHostnames(Set<Resource> resources) {
    List<String> hostNames = new ArrayList<>();
    for (Resource resource: resources) {
      String hostname = getHostName(resource);
      if (hostname != null) {
        hostNames.add(hostname);
      }
    }
    return hostNames;
  }
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