public void adviseConfiguration(ClusterTopology clusterTopology, Map<String, Map<String, String>> userProvidedConfigurations) throws ConfigurationTopologyException {
    StackAdvisorRequest request = createStackAdvisorRequest(clusterTopology, StackAdvisorRequestType.CONFIGURATIONS);
    try {
      RecommendationResponse response = stackAdvisorHelper.recommend(request);
      addAdvisedConfigurationsToTopology(response, clusterTopology, userProvidedConfigurations);
    } catch (StackAdvisorException | AmbariException e) {
      throw new ConfigurationTopologyException(RECOMMENDATION_FAILED, e);
    } catch (IllegalArgumentException e) {
      throw new ConfigurationTopologyException(INVALID_RESPONSE, e);
    }
  }
Recommend configurations by the stack advisor, then store the results in cluster topology.
@param clusterTopology cluster topology instance
@param userProvidedConfigurations User configurations of cluster provided in Blueprint + Cluster template
ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessor.java