static void removeNonStackConfigRecommendations(Configuration stackConfig,  Map<String, RecommendationResponse.BlueprintConfigurations> configRecommendations) {
    configRecommendations.keySet().removeIf(configType -> !stackConfig.containsConfigType(configType));
    configRecommendations.entrySet().forEach( e -> {
      String cfgType = e.getKey();
      RecommendationResponse.BlueprintConfigurations cfg = e.getValue();
      cfg.getProperties().keySet().removeIf(propName -> !stackConfig.containsConfig(cfgType, propName));
      if (null != cfg.getPropertyAttributes()) {
        cfg.getPropertyAttributes().keySet().removeIf(propName -> !stackConfig.containsConfig(cfgType, propName));
      }
    });
    configRecommendations.values().removeIf(cfg -> cfg.getProperties().isEmpty() && cfg.getPropertyAttributes().isEmpty());
  }
Reuse information from layout recommendation if it happened
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/StackAdvisorAdapter.java