private AlertCurrentEntity getCurrentEntity(long clusterId, Alert alert, AlertDefinitionEntity definition){
    if (StringUtils.isBlank(alert.getHostName()) || definition.isHostIgnored()) {
      return m_alertsDao.findCurrentByNameNoHost(clusterId, alert.getName());
    } else {
      return m_alertsDao.findCurrentByHostAndName(clusterId, alert.getHostName(),
        alert.getName());
    }
  }
Gets the {@link AlertCurrentEntity} which cooresponds to the new alert being received, if any.

@param clusterId the ID of the cluster.
@param alert the alert being received (not {@code null}).
@param definition  the {@link AlertDefinitionEntity} for the alert being received (not {@code null}).
@return  the existing current alert or {@code null} for none.
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java