@Override
  public MetadataUpdateEvent getClusterMetadataOnConfigsUpdate(Cluster cl) throws AmbariException {
    final TreeMap<String, MetadataCluster> metadataClusters = new TreeMap<>();
    metadataClusters.put(Long.toString(cl.getClusterId()), MetadataCluster.clusterLevelParamsMetadataCluster(null, getMetadataClusterLevelParams(cl, cl.getDesiredStackVersion())));
    return new MetadataUpdateEvent(metadataClusters, null, getMetadataAgentConfigs(), UpdateEventType.UPDATE);
  }
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