public Set<String> getLogFileNames(String component, String host, String cluster) {
    final String key = generateKey(component, host);

    // check cache for data
    Set<String> cacheResult = logFileNameCache.getIfPresent(key);

    if (cacheResult != null) {
      LOG.debug("LogFileNames result for key = {} found in cache", key);
      return cacheResult;
    } else {
      if (!componentRequestFailureCounts.containsKey(component) || componentRequestFailureCounts.get(component).get() < MAX_RETRIES_FOR_FAILED_METADATA_REQUEST) {
        // queue up a thread to create the LogSearch REST request to obtain this information
        if (currentRequests.contains(key)) {
          LOG.debug("LogFileNames request has been made for key = {}, but not completed yet", key);
        } else {
          LOG.debug("LogFileNames result for key = {} not in cache, queueing up remote request", key);
          // add request key to queue, to keep multiple copies of the same request from
          // being submitted
          currentRequests.add(key);
          startLogSearchFileNameRequest(host, component, cluster);
        }
      } else {
        LOG.debug("Too many failures occurred while attempting to obtain log file metadata for component = {}, Ambari will ignore this component for LogSearch Integration", component);
      }
    }

    return null;
  }
This method attempts to obtain the log file names for the specified component
  on the specified host.  A cache lookup is first attempted. If the cache does not contain
  this data, an asynchronous task is launched in order to make the REST request to
  the LogSearch server to obtain this data.

Once the data is available in the cache, subsequent calls for a given Host/Component
  combination should return non-null.

@param component the component name
@param host the host name
@param cluster the cluster name

@return a Set<String> that includes the log file names associated with this Host/Component
        combination, or null if that object does not exist in the cache.
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java