public class LogSearchDataRetrievalService
extends com.google.common.util.concurrent.AbstractService
LogSearchDataRetrievalService
is an Ambari Service that
is used by the Ambari LogSearch integration code to obtain response
data from the LogSearch server.
In order to improve the performance of the LogSearch integration layer in
Ambari, this service implements the following:
AmbariService
, this class may be
injected in order to obtain cached access to the LogSearch responses.
Caches are initially empty in this implementation, and a remote request
to the LogSearch server will be made upon the first request for a given
response.Constructor and Description |
---|
LogSearchDataRetrievalService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
protected Map<String,AtomicInteger> |
getComponentRequestFailureCounts()
This protected method allows for simpler unit tests.
|
protected Set<String> |
getCurrentRequests()
This protected method allows for simpler unit tests.
|
Set<String> |
getLogFileNames(String component,
String host,
String cluster)
This method attempts to obtain the log file names for the specified component
on the specified host.
|
String |
getLogFileTailURI(String baseURI,
String component,
String host,
String cluster) |
protected void |
setExecutor(Executor executor)
This protected method provides a way for unit-tests to insert a
mock executor for simpler unit-testing.
|
protected void |
setLoggingRequestHelperFactory(LoggingRequestHelperFactory loggingRequestHelperFactory) |
protected void doStart()
doStart
in class com.google.common.util.concurrent.AbstractService
protected void doStop()
doStop
in class com.google.common.util.concurrent.AbstractService
public Set<String> getLogFileNames(String component, String host, String cluster)
component
- the component namehost
- the host namecluster
- the cluster namepublic String getLogFileTailURI(String baseURI, String component, String host, String cluster)
protected void setLoggingRequestHelperFactory(LoggingRequestHelperFactory loggingRequestHelperFactory)
protected void setExecutor(Executor executor)
executor
- an Executor instanceprotected Set<String> getCurrentRequests()
protected Map<String,AtomicInteger> getComponentRequestFailureCounts()
Copyright © 2022 Apache Software Foundation. All rights reserved.