public Map<String, String> getHostRackInfo() {
    synchronized (hostRackInfo) {
      return new HashMap<>(hostRackInfo);
    }
  }
Returns a map with host names mapped to rack information.

@return a copy of the current instance' rack information map
ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java