private static void generateAdminInfosAndUpload(HelixBootstrapUpgradeUtil clusterMapToHelixMapper, String adminType,
      String adminConfigFilePath) throws IOException {
    switch (adminType) {
      case PARTITION_OVERRIDE_STR:
        Map<String, Map<String, Map<String, String>>> partitionOverrideInfosByDc =
            adminConfigFilePath == null ? clusterMapToHelixMapper.generatePartitionOverrideFromClusterMap()
                : clusterMapToHelixMapper.generatePartitionOverrideFromConfigFile(adminConfigFilePath);
        clusterMapToHelixMapper.uploadClusterAdminInfos(partitionOverrideInfosByDc, PARTITION_OVERRIDE_STR,
            PARTITION_OVERRIDE_ZNODE_PATH);
        break;
      case REPLICA_ADDITION_STR:
        Map<String, Map<String, Map<String, String>>> replicaAdditionInfosByDc =
            clusterMapToHelixMapper.generateReplicaAdditionMap();
        clusterMapToHelixMapper.uploadClusterAdminInfos(replicaAdditionInfosByDc, REPLICA_ADDITION_STR,
            REPLICA_ADDITION_ZNODE_PATH);
        break;
      default:
        throw new IllegalArgumentException(
            "Unrecognized admin config type: " + adminType + ". Current supported types are: " + PARTITION_OVERRIDE_STR
                + ", " + REPLICA_ADDITION_STR);
    }
    info("Upload cluster configs completed.");
  }
Generate cluster admin configs based on admin type and upload them to Helix PropertyStore
@param clusterMapToHelixMapper {@link HelixBootstrapUpgradeUtil} to use.
@param adminType the type of admin operation.
@param adminConfigFilePath if not null, use this file to generate admin config infos to upload to Helix.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java