private void verifyPartitionPlacementIsFullAutoCompatibleInStatic(String dcName) {
    // First, for all partitions, find the instances
    Map<String, Set<String>> partitionToInstances = new HashMap<>();
    for (PartitionId partitionId : staticClusterMap.getAllPartitionIds(null)) {
      for (ReplicaId replicaId : partitionId.getReplicaIds()) {
        if (replicaId.getDataNodeId().getDatacenterName().equals(dcName)) {
          partitionToInstances.computeIfAbsent(String.valueOf(partitionId.getId()), k -> new HashSet<>())
              .add(getInstanceName(replicaId.getDataNodeId()));
        }
      }
    }
    for (Set<String> instanceNames : groupInstancesBasedOnSharedPartition(partitionToInstances)) {
      ensureOrThrow(instanceNames.size() <= maxInstancesInOneResourceForFullAuto,
          "A group of instances who share partitions is bigger than " + maxInstancesInOneResourceForFullAuto + ": "
              + instanceNames);
    }
    info("[{}] Done verify partition placement in static file is full auto compatible", dcName.toUpperCase());
  }
Verify that partition placement in static layout is FULL_AUTO compatible.
In order to be FULL_AUTO compatible, the size of instance group should not exceed the given max number of instances
in one resource.
@param dcName The datacenter.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java