private ConcurrentHashMap<Long, Host> getHostsById() {
    if (hostsById == null) {
      safelyLoadClustersAndHosts();
    }
    return hostsById;
  }
Gets the internal hosts-by-id map, ensuring that the relevant data has been previously initialized.

@return a map of the requested data
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java