private String getRMHosts() {
    StringBuilder hosts = new StringBuilder();
    boolean first = true;
    for (String host : context.getCluster().getHostsForServiceComponent("YARN", "RESOURCEMANAGER")) {
      if (!first) {
        hosts.append(",");
      }
      hosts.append(host);
      first = false;
    }
    return hosts.toString();
  }
Sets capacity scheduler configuration and restart ResourceManager.

@return http response
contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java