class HiveZKQuorumConfigAction extends AbstractUpgradeServerAction {

  @Override
  public CommandReport execute(ConcurrentMap<String, Object> requestSharedDataContext)
      throws AmbariException, InterruptedException {

    String clusterName = getExecutionCommand().getClusterName();
    Cluster cluster = getClusters().getCluster(clusterName);

    Config hiveSite = cluster.getDesiredConfigByType(HIVE_SITE_CONFIG_TYPE);
    if (hiveSite == null) {
      return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
          String.format(
              "The %s configuration type was not found; unable to set Hive configuration properties",
              HIVE_SITE_CONFIG_TYPE),
          "");
    }

    String zookeeperQuorum = ZooKeeperQuorumCalculator.getZooKeeperQuorumString(cluster);

    Map<String, String> hiveSiteProperties = hiveSite.getProperties();
    hiveSiteProperties.put(HIVE_SITE_ZK_QUORUM, zookeeperQuorum);
    hiveSiteProperties.put(HIVE_SITE_ZK_CONNECT_STRING, zookeeperQuorum);

    hiveSite.setProperties(hiveSiteProperties);
    hiveSite.save();
    agentConfigsHolder.updateData(cluster.getClusterId(), cluster.getHosts().stream().map(Host::getHostId).collect(Collectors.toList()));

    return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
        String.format("Successfully set %s and %s in %s", HIVE_SITE_ZK_QUORUM,
            HIVE_SITE_ZK_CONNECT_STRING, HIVE_SITE_CONFIG_TYPE),
        "");
  }

}