void updatePartitions(Collection<? extends PartitionId> allPartitions, String localDatacenterName) {
      // since this method is called during initialization only, we don't really need read-write lock here.
      this.allPartitions = allPartitions;
      partitionIdsByClassAndLocalReplicaCount = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
      partitionIdToLocalReplicas = new HashMap<>();
      populatePartitionAndLocalReplicaMaps(allPartitions, partitionIdsByClassAndLocalReplicaCount,
          partitionIdToLocalReplicas, localDatacenterName);
    }
Updates the partitions tracked by this helper.
@param allPartitions the list of all {@link PartitionId}s
@param localDatacenterName the name of the local datacenter. Can be null if datacenter specific replica counts
                           are not required.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java