public boolean isHashCached(String clusterName, String hostName) {
    if (null == clusterName || null == hostName) {
      return false;
    }

    Map<String, String> clusterMapping = m_hashes.get(hostName);
    if (null == clusterMapping) {
      return false;
    }

    return clusterMapping.containsKey(clusterName);
  }
Gets whether the alert definition hash for the specified host has been
calculated and cached.

@param hostName
         the host.
@return {@code true} if the hash was calculated; {@code false} otherwise.
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionHash.java