class ConfigurationRecommendationCommand extends StackAdvisorCommand<RecommendationResponse> {

  protected Set<HostGroup> processHostGroups(StackAdvisorRequest request) {
    Set<HostGroup> resultSet = new HashSet<>();
    for (Map.Entry<String, Set<String>> componentHost : request.getHostComponents().entrySet()) {
      String hostGroupName = componentHost.getKey();
      Set<String> components = componentHost.getValue();
      if (hostGroupName != null && components != null) {
        HostGroup hostGroup = new HostGroup();
        Set<Map<String, String>> componentsSet = new HashSet<>();
        for (String component : components) {
          Map<String, String> componentMap = new HashMap<>();
          componentMap.put("name", component);
          componentsSet.add(componentMap);
        }
        hostGroup.setComponents(componentsSet);
        hostGroup.setName(hostGroupName);
        resultSet.add(hostGroup);
      }
    }
    return resultSet;
  }

  public  ConfigurationRecommendationCommand(StackAdvisorCommandType commandType, File recommendationsDir,
                                            String recommendationsArtifactsLifetime,
                                            ServiceInfo.ServiceAdvisorType serviceAdvisorType,
                                            int requestId,
                                            StackAdvisorRunner saRunner,
                                            AmbariMetaInfo metaInfo,
                                            AmbariServerConfigurationHandler ambariServerConfigurationHandler);

}