public TreeMap<String, MetadataServiceInfo> getMetadataServiceLevelParams(Cluster cluster) throws AmbariException {
    TreeMap<String, MetadataServiceInfo> serviceLevelParams = new TreeMap<>();
    for (Map.Entry<String, Service> serviceEntry : cluster.getServices().entrySet()) {
      Service service = serviceEntry.getValue();
      serviceLevelParams.putAll(getMetadataServiceLevelParams(service));
    }
    return serviceLevelParams;
  }
Collects full metadata info about clusters for agent.
@return metadata info about clusters
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java