@Override
    public void run() {
      LOG.debug("LogSearchFileNameRequestRunnable: starting...");
      try {
        LoggingRequestHelper helper =
          loggingRequestHelperFactory.getHelper(controller, cluster);

        if (helper != null) {
          // make request to LogSearch service
          HostLogFilesResponse logFilesResponse = helper.sendGetLogFileNamesRequest(host);
          // update the cache if result is available
          if (logFilesResponse != null && MapUtils.isNotEmpty(logFilesResponse.getHostLogFiles())) {
            LOG.debug("LogSearchFileNameRequestRunnable: request was successful, updating cache");
            // update cache with returned result
            for (Map.Entry<String, List<String>> componentEntry : logFilesResponse.getHostLogFiles().entrySet()) {
              final String key = generateKey(componentEntry.getKey(), host);
              logFileNameCache.put(key, new HashSet<>(componentEntry.getValue()));
            }
          } else {
            LOG.debug("LogSearchFileNameRequestRunnable: remote request was not successful for component = {} on host ={}", component, host);
            if (!componentRequestFailureCounts.containsKey(component)) {
              componentRequestFailureCounts.put(component, new AtomicInteger());
            }

            // increment the failure count for this component
            componentRequestFailureCounts.get(component).incrementAndGet();
          }
        } else {
          LOG.debug("LogSearchFileNameRequestRunnable: request helper was null.  This may mean that LogSearch is not available, or could be a potential connection problem.");
        }
      } finally {
        // since request has completed (either successfully or not),
        // remove this host/component key from the current requests
        currentRequests.remove(generateKey(component, host));
      }
    }
A {@link Runnable} used to make requests to the remote LogSearch server's
  REST API.

This implementation will update a cache shared with the {@link LogSearchDataRetrievalService},
  which can then be used for subsequent requests for the same data.
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java