This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Oliver Szabo and Sumit Mohanty.

Bugs: AMBARI-16093

Repository: ambari


This patch resolves AMBARI-16093.

Hundreds of repeated error logs were occuring in instances when the LogSearch 
server was unexpectedly shutdown, and Ambari Server was not yet aware of the 
change in service state. 

The LoggingSearchPropertyProvider already waits until the LOGSEARCH_SERVER 
component is in the started state, but if that component shuts down 
unexpectedly, there will be a small time window during which the provider will 
attempt to connect to the LogSearch server, which will then fail and generate 
error logs.

In order to resolve this logging issue, this patch implements the following:

1. Implements a new utility class to handle checks on a specified counter, 
which can be used to limit the number of times a given error log is included in 
2. Modifies the LoggingSearchPropertyProvider and LoggingRequestHelperImpl 
classes to use this new utility class in cases where this problem of repeated 
logging may occur.  
3. Implements a new unit test case for the new utility class, to verify that a 
given log is only passed to the logger in certain circumstances, based on the 
value of the specified counter.



Diff: https://reviews.apache.org/r/46639/diff/


1. Deployed a 1-VM cluster without LogSearch enabled, verified that the cluster 
deployed successfully, and that no extraneous error logging occurring in 
ambari-server.log or ambari-server.out.
2. Deployed a 1-VM cluster with LogSearch enabled, verified that the cluster 
deployed successfully, verified that the LogSearch Integration APIs are 
functioning as expected.  As part of this test, I also killed the LogSearch 
Server with "kill -9", accessed the various portions of the UI that rely on the 
HostComponent REST API, and verified that no extraneous logging was present in 
ambari-server.log or ambari-server.out.
3. Ran the ambari-server "mvn clean test" suite with my patch applied.  Test 

Results :

Tests run: 4273, Failures: 0, Errors: 0, Skipped: 32

INFO: AMBARI_SERVER_LIB is not set, using default /usr/lib/ambari-server
INFO: Return code from stack upgrade command, retcode = 0
StackAdvisor implementation for stack HDP1, version 2.0.6 was not found
Returning DefaultStackAdvisor implementation
StackAdvisor implementation for stack XYZ, version 1.0.0 was loaded
StackAdvisor implementation for stack XYZ, version 1.0.1 was loaded
Returning XYZ101StackAdvisor implementation
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:19:32.519s
[INFO] Finished at: Mon Apr 25 11:02:50 EDT 2016
[INFO] Final Memory: 38M/720M
[INFO] ————————————————————————————————————


Robert Nettleton

Reply via email to