@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    Datacenter that = (Datacenter) o;

    return name.equals(that.name);
  }
A datacenter can be marked as rack-aware if all nodes have defined rack IDs. This method throws an exception
if some nodes have rack IDs and some do not.  It also sets the {@code rackAware} flag to {@code true} if all
nodes have rack IDs.

@throws IllegalStateException if some nodes have defined rack IDs and some do not.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/Datacenter.java