public void setLocalDatacenterName(String localDatacenterName) {
    if (!hasDatacenter(localDatacenterName)) {
      throw new IllegalArgumentException("Clustermap has no DC named " + localDatacenterName);
    }
    this.localDatacenterName = localDatacenterName;
    partitionSelectionHelper.updatePartitions(partitions.values(), localDatacenterName);
  }
Sets the local datacenter name and changes the views of the partition classes. Not thread safe.
@param localDatacenterName the name of the local datacenter
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockClusterMap.java