private static DataNodeConfig getDataNodeConfigFromHelix(String clusterName, String instanceName,
      PropertyStoreToDataNodeConfigAdapter adapter, InstanceConfigToDataNodeConfigAdapter.Converter converter,
      HelixAdmin helixAdmin, DataNodeConfigSourceType dataNodeConfigSourceType) {
    DataNodeConfig dataNodeConfig;
    if (dataNodeConfigSourceType == PROPERTY_STORE) {
      dataNodeConfig = adapter.get(instanceName);
    } else {
      dataNodeConfig = converter.convert(helixAdmin.getInstanceConfig(clusterName, instanceName));
    }
    return dataNodeConfig;
  }
Add and/or update instances in Helix based on the information in the static cluster map.
@param dcName the name of the datacenter being processed.
@param partitionsToInstancesInDc a map to be filled with the mapping of partitions to their instance sets in the
                                 given datacenter.
@param resourcesAreFullAutoCompatible true if the resources are constructed as full auto compatible
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java