You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Robert Nettleton <rn...@hortonworks.com> on 2016/04/19 15:27:33 UTC

Review Request 46387: Add Log Level count support to LogSearch integration

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/
-----------------------------------------------------------

Review request for Ambari, Oliver Szabo and Sumit Mohanty.


Bugs: AMBARI-15976
    https://issues.apache.org/jira/browse/AMBARI-15976


Repository: ambari


Description
-------

This patch resolves AMBARI-15976. 

The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 

This patch also includes some smaller, miscellaneous fixes:

1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
3. Basic code cleanup, to remove code that is no longer necessary in the integration.
4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 

This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 

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


Testing
-------

1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
3. I'm starting a local "mvn clean test" run now, and will post the results when available.


Thanks,

Robert Nettleton


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/#review129561
-----------------------------------------------------------


Ship it!




Ship It!

- Sumit Mohanty


On April 19, 2016, 2:58 p.m., Robert Nettleton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46387/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 2:58 p.m.)
> 
> 
> Review request for Ambari, Oliver Szabo and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15976
>     https://issues.apache.org/jira/browse/AMBARI-15976
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch resolves AMBARI-15976. 
> 
> The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 
> 
> This patch also includes some smaller, miscellaneous fixes:
> 
> 1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
> 2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
> 3. Basic code cleanup, to remove code that is no longer necessary in the integration.
> 4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 
> 
> This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 
> 
> Diff: https://reviews.apache.org/r/46387/diff/
> 
> 
> Testing
> -------
> 
> 1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
> 2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
> 3. "mvn clean test" results:
> 
> Results :
> 
> Failed tests:
>   ViewDirectoryWatcherTest.testDirectoryExtractionOnFileAdd:111
>   Expectation failure on verify:
>     ViewRegistry.readViewArchive(/var/folders/7l/3g9wc3qn4t36xr465lhmrk0c0000gp/T/test_dir/file.jar): expected: 1, actual: 0
> 
> Tests run: 4237, Failures: 1, Errors: 0, Skipped: 32
> 
> This failure is an expected failure on trunk, and is not caused by this current patch.
> 
> 
> Thanks,
> 
> Robert Nettleton
> 
>


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Robert Nettleton <rn...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/
-----------------------------------------------------------

(Updated April 19, 2016, 2:58 p.m.)


Review request for Ambari, Oliver Szabo and Sumit Mohanty.


Bugs: AMBARI-15976
    https://issues.apache.org/jira/browse/AMBARI-15976


Repository: ambari


Description
-------

This patch resolves AMBARI-15976. 

The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 

This patch also includes some smaller, miscellaneous fixes:

1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
3. Basic code cleanup, to remove code that is no longer necessary in the integration.
4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 

This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 

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


Testing (updated)
-------

1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
3. "mvn clean test" results:

Results :

Failed tests:
  ViewDirectoryWatcherTest.testDirectoryExtractionOnFileAdd:111
  Expectation failure on verify:
    ViewRegistry.readViewArchive(/var/folders/7l/3g9wc3qn4t36xr465lhmrk0c0000gp/T/test_dir/file.jar): expected: 1, actual: 0

Tests run: 4237, Failures: 1, Errors: 0, Skipped: 32

This failure is an expected failure on trunk, and is not caused by this current patch.


Thanks,

Robert Nettleton


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Oliver Szabo <os...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/#review129527
-----------------------------------------------------------


Ship it!




Ship It!

- Oliver Szabo


On April 19, 2016, 1:49 p.m., Robert Nettleton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46387/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 1:49 p.m.)
> 
> 
> Review request for Ambari, Oliver Szabo and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15976
>     https://issues.apache.org/jira/browse/AMBARI-15976
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch resolves AMBARI-15976. 
> 
> The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 
> 
> This patch also includes some smaller, miscellaneous fixes:
> 
> 1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
> 2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
> 3. Basic code cleanup, to remove code that is no longer necessary in the integration.
> 4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 
> 
> This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 
> 
> Diff: https://reviews.apache.org/r/46387/diff/
> 
> 
> Testing
> -------
> 
> 1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
> 2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
> 3. I'm starting a local "mvn clean test" run now, and will post the results when available.
> 
> 
> Thanks,
> 
> Robert Nettleton
> 
>


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Robert Nettleton <rn...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/
-----------------------------------------------------------

(Updated April 19, 2016, 1:49 p.m.)


Review request for Ambari, Oliver Szabo and Sumit Mohanty.


Changes
-------

Uploaded version 2 of patch, fixing the unit test issue mentioned by reviewer.


Bugs: AMBARI-15976
    https://issues.apache.org/jira/browse/AMBARI-15976


Repository: ambari


Description
-------

This patch resolves AMBARI-15976. 

The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 

This patch also includes some smaller, miscellaneous fixes:

1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
3. Basic code cleanup, to remove code that is no longer necessary in the integration.
4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 

This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
  ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
  ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 

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


Testing
-------

1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
3. I'm starting a local "mvn clean test" run now, and will post the results when available.


Thanks,

Robert Nettleton


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Robert Nettleton <rn...@hortonworks.com>.

> On April 19, 2016, 1:35 p.m., Oliver Szabo wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java, line 42
> > <https://reviews.apache.org/r/46387/diff/1/?file=1350515#file1350515line42>
> >
> >     not related with the change, because it was there earlier, but we should not use .* imports

Thanks for catching this, I'll update the patch and upload a new version.


- Robert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/#review129522
-----------------------------------------------------------


On April 19, 2016, 1:27 p.m., Robert Nettleton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46387/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 1:27 p.m.)
> 
> 
> Review request for Ambari, Oliver Szabo and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15976
>     https://issues.apache.org/jira/browse/AMBARI-15976
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch resolves AMBARI-15976. 
> 
> The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 
> 
> This patch also includes some smaller, miscellaneous fixes:
> 
> 1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
> 2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
> 3. Basic code cleanup, to remove code that is no longer necessary in the integration.
> 4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 
> 
> This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 
> 
> Diff: https://reviews.apache.org/r/46387/diff/
> 
> 
> Testing
> -------
> 
> 1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
> 2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
> 3. I'm starting a local "mvn clean test" run now, and will post the results when available.
> 
> 
> Thanks,
> 
> Robert Nettleton
> 
>


Re: Review Request 46387: Add Log Level count support to LogSearch integration

Posted by Oliver Szabo <os...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46387/#review129522
-----------------------------------------------------------




ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java (line 42)
<https://reviews.apache.org/r/46387/#comment192950>

    not related with the change, because it was there earlier, but we should not use .* imports


- Oliver Szabo


On April 19, 2016, 1:27 p.m., Robert Nettleton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46387/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 1:27 p.m.)
> 
> 
> Review request for Ambari, Oliver Szabo and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15976
>     https://issues.apache.org/jira/browse/AMBARI-15976
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch resolves AMBARI-15976. 
> 
> The LogSearch integration layer in Ambari has been updated in order to provide log level count information on a per-HostComponent basis.  This work involves the addition of new utility methods in the LoggingRequestHelper implementation to make the level count request to the LogSearch server, and also adds the changes to the LoggingSearchPropertyProvider to attach these new results to the HostComponent resource, under the "logging" property. 
> 
> This patch also includes some smaller, miscellaneous fixes:
> 
> 1. Updated logging code in the LogSearch integration, so that no logs should appear in the ambari-server.log when LogSearch is not enabled in a cluster.  
> 2. Added a check to verify that the LOGSEARCH_SERVER is up and running prior to making a connection attempt. 
> 3. Basic code cleanup, to remove code that is no longer necessary in the integration.
> 4. Added some basic support for usage of the CredentialStoreService to obtain the LogSearch connection credentials.  This support will be updated in a future patch as well. 
> 
> This patch also adds new unit tests, and modifies existing tests to accomodate the changes in this patch.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java 08ec06e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java a448a1f 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java 58bab59 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/LoggingResourceProvider.java f2e07bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/HostComponentLoggingInfo.java 516c322 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponse.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogLineResult.java b6ab6bd 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelper.java c1fe1d2 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImpl.java 69d4f3c 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java 2c3d941 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java 2d2ef18 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/logging/NameValuePair.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogLevelQueryResponseTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperFactoryImplTest.java 08f945d 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b360a49 
> 
> Diff: https://reviews.apache.org/r/46387/diff/
> 
> 
> Testing
> -------
> 
> 1. Deployed a single-node cluster without LogSearch selected, verified that the cluster deployed successfully, and that no extraneous logging related to LogSearch was present in ambari-server.log.
> 2. Deployed a single-node cluster with LogSearch included, verified that the cluster deployed successfully, and that the REST APIs are functioning as expected with respect to LogSearch. 
> 3. I'm starting a local "mvn clean test" run now, and will post the results when available.
> 
> 
> Thanks,
> 
> Robert Nettleton
> 
>