private URI createLogSearchQueryURI(String scheme, Map<String, String> queryParameters) throws URISyntaxException {
    URIBuilder uriBuilder = createBasicURI(scheme);
    appendUriPath(uriBuilder, LOGSEARCH_QUERY_PATH);

    // set the current cluster name, in case this LogSearch service supports data
    // for multiple clusters
    uriBuilder.addParameter(LOGSEARCH_CLUSTERS_QUERY_PARAMETER_NAME, cluster.getClusterName());

    // add any query strings specified
    for (String key : queryParameters.keySet()) {
      uriBuilder.addParameter(key, queryParameters.get(key));
    }

    return uriBuilder.build();
  }
Generates the log file tail URI, using the LogSearch server's
query parameters.

@param baseURI the base URI for this request, typically the URI to the
               Ambari Integration searchEngine component

@param componentName the component name
@param hostName the host name

@return
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java