final void logException(Throwable throwable, String url) {
      String cacheKey = buildCacheKey(throwable, url);
      if (null == s_exceptionCache.getIfPresent(cacheKey)) {
        // cache it and log it
        s_exceptionCache.put(cacheKey, throwable);
        LOG.error(
            "Unable to retrieve metrics from {}. Subsequent failures will be suppressed from the log for {} minutes.",
            url, EXCEPTION_CACHE_TIMEOUT_MINUTES, throwable);
      }
    }
Logs the exception for the URL exactly once and caches the fact that the
exception was logged. This is to prevent an endpoint being down from
spamming the logs.

@param throwable
         the exception to log (not {@code null}).
@param url
         the URL associated with the exception (not {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java