private void migrateToPropertyStore() throws InterruptedException {
    CountDownLatch migrationComplete = new CountDownLatch(adminForDc.size());
    // different DCs can be migrated in parallel
    adminForDc.forEach((dcName, helixAdmin) -> Utils.newThread(() -> {
      try {
        logger.info("Starting property store migration in {}", dcName);
        ClusterMapConfig config = getClusterMapConfig(clusterName, dcName, null);
        InstanceConfigToDataNodeConfigAdapter.Converter instanceConfigConverter =
            new InstanceConfigToDataNodeConfigAdapter.Converter(config);
        String zkConnectStr = dataCenterToZkAddress.get(dcName).getZkConnectStrs().get(0);
        try (DataNodeConfigSource source = new PropertyStoreToDataNodeConfigAdapter(zkConnectStr, config)) {
          List<String> instanceNames = helixAdmin.getInstancesInCluster(clusterName);
          logger.info("Found {} instances in cluster", instanceNames.size());
          instanceNames.forEach(instanceName -> {
            logger.info("Copying config for node {}", instanceName);
            InstanceConfig instanceConfig = helixAdmin.getInstanceConfig(clusterName, instanceName);
            DataNodeConfig dataNodeConfig = instanceConfigConverter.convert(instanceConfig);
            logger.debug("Writing {} to property store in {}", dataNodeConfig, dcName);
            if (!source.set(dataNodeConfig)) {
              logger.error("Failed to persist config for node {} in the property store.",
                  dataNodeConfig.getInstanceName());
            }
          });
        }
        logger.info("Successfully migrated to property store in {}", dcName);
      } catch (Throwable t) {
        logger.error("Error while migrating to property store in {}", dcName, t);
      } finally {
        migrationComplete.countDown();
      }
    }, false).start());

    migrationComplete.await();
  }
Convert instance configs to the new DataNodeConfig format and persist them in the property store.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java