-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55885/
-----------------------------------------------------------
Review request for Ambari, Miklos Gergely, Oliver Szabo, and Robert Levas.
Bugs: AMBARI-19658
https://issues.apache.org/jira/browse/AMBARI-19658
Repository: ambari
Description
-------
This patch resolves AMBARI-19658.
The previous implementation of a data cache in the LogSearch integration code
in Ambari used a 1-hour timeout to invalidate the Logging metadata caches in
the LogSearchDataRetrievalService. Subsequent testing and investigation showed
that this timeout value resulted in too many un-necessary calls to the
LogSearch portal, since the cache would be invalidated every hour.
Since the data maintained in the cache is generally not updated that
freqeuently, the timeout should be larger and configuration.
This patch implements the following:
1. Introduces a new configuration property in ambari.properties
("logsearch.metadata.cache.expire.timeout") that will be used to configure the
internal Cache instances used by the LogSearchDataRetrievalService. By
default, this timeout will be set to 24 hours.
2. Updates existing unit tests to reflect this change.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
df1b627
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java
ce6094c
ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalServiceTest.java
033d698
Diff: https://reviews.apache.org/r/55885/diff/
Testing
-------
1. Tested the patch against a local 3-node vagrant cluster with LogSearch,
HDFS, and Yarn installed.
2. Ran the ambari-server "mvn clean test" suite, with the following results:
"
Results :
Tests in error:
AmbariMetaInfoTest.testCrossCheckJmxToGangliaMetrics:1002 » Provision Guice
pr...
KerberosServiceMetaInfoTest.before:160->createAmbariMetaInfo:211 » Provision
G...
KerberosServiceMetaInfoTest.before:160->createAmbariMetaInfo:211 » Provision
G...
KerberosServiceMetaInfoTest.before:160->createAmbariMetaInfo:211 » Provision
G...
StackManagerTest.testMetricsLoaded:778 » Ambari Stack Definition Service at
'/...
StackManagerTest.testServicesWithLogsearchRoleCommandOrder:972 » Ambari Stack
...
StackManagerTest.testServicesWithRangerPluginRoleCommandOrder:843 » Ambari
Sta...
KerberosDescriptorUpdateHelperTest.updateDefaultUserKerberosDescriptor:101 »
Provision
Tests run: 4882, Failures: 0, Errors: 8, Skipped: 38
"
Note: These same unit tests are failing on trunk without this patch applied,
so it appears that this current patch does not cause these failures.
Thanks,
Robert Nettleton