static void migrateToFullAuto(String clusterName, String dcs, String zkLayoutPath, String resources,
      HelixAdminFactory helixAdminFactory, String wagedConfigFilePath, int maxInstancesInOneResourceForFullAuto,
      boolean setPreferenceList, boolean dryRun, boolean addConfigs) throws Exception {
    Map<String, ClusterMapUtils.DcZkInfo> dataCenterToZkAddress = parseAndUpdateDcInfoFromArg(dcs, zkLayoutPath);
    for (Map.Entry<String, ClusterMapUtils.DcZkInfo> entry : dataCenterToZkAddress.entrySet()) {
      String dcName = entry.getKey();
      List<String> zkConnectStrs = entry.getValue().getZkConnectStrs();
      if (zkConnectStrs.size() != 1) {
        throw new IllegalArgumentException(
            entry.getKey() + " has invalid number of ZK endpoints: " + zkConnectStrs.size());
      }
      HelixAdmin admin = helixAdminFactory.getHelixAdmin(zkConnectStrs.get(0));
      info("Migrate to Full-Auto. Cluster {}, dc {}, resources {}, dry run {}", clusterName, dcName, resources, dryRun);
      migrateToFullAuto(dcName, clusterName, admin, zkConnectStrs.get(0), resources,
          new ObjectMapper().readValue(Utils.readStringFromFile(wagedConfigFilePath), WagedHelixConfig.class),
          setPreferenceList, maxInstancesInOneResourceForFullAuto, dryRun, addConfigs);
    }
  }
Migrate resources from semi-auto to full-auto.

@param clusterName                          Cluster name in Helix.
@param dcs                                  The comma-separated list of data centers that needs to be migrated to
                                            Full Auto.
@param zkLayoutPath                         The path to the zookeeper layout file.
@param resources                            Comma-separated list of resources that needs to be migrated
@param helixAdminFactory                    The {@link HelixAdminFactory} to use to instantiate {@link HelixAdmin}
@param wagedConfigFilePath                  Path to waged configuration properties file.
@param maxInstancesInOneResourceForFullAuto Max number of instances to be assigned under one resource when the
                                            resources are in full auto compatible mode
@param setPreferenceList                    If {@code true}, sets semi-auto placement as preference list for
                                            full-auto
@param dryRun                               If true, perform a dry run; do not update anything in Helix.
@param addConfigs
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java