class AmbariManagementControllerImpl implements AmbariManagementController {

  @Override
  public void registerRackChange(String clusterName) throws AmbariException {
    Cluster cluster = clusters.getCluster(clusterName);

    for (Service service : cluster.getServices().values()) {
      ServiceInfo serviceInfo = ambariMetaInfo.getService(service);

      if (!BooleanUtils.toBoolean(serviceInfo.isRestartRequiredAfterRackChange())) {
        continue;
      }

      Map<String, ServiceComponent> serviceComponents = service.getServiceComponents();

      for (ServiceComponent serviceComponent : serviceComponents.values()) {
        Map<String, ServiceComponentHost> schMap = serviceComponent.getServiceComponentHosts();
        for (Entry<String, ServiceComponentHost> sch : schMap.entrySet()) {
          ServiceComponentHost serviceComponentHost = sch.getValue();
          serviceComponentHost.setRestartRequired(true);
        }
      }
    }
  }

  @Inject public  AmbariManagementControllerImpl(ActionManager actionManager,
      Clusters clusters, Injector injector);

}