You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Robert Nettleton (JIRA)" <ji...@apache.org> on 2016/07/20 15:20:20 UTC

[jira] [Updated] (AMBARI-17811) LogSearch search engine resource throws NullPointer when LogSearch not available

     [ https://issues.apache.org/jira/browse/AMBARI-17811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Nettleton updated AMBARI-17811:
--------------------------------------
    Attachment: AMBARI-17811.patch

Uploaded initial version of patch.

> LogSearch search engine resource throws NullPointer when LogSearch not available
> --------------------------------------------------------------------------------
>
>                 Key: AMBARI-17811
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17811
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Robert Nettleton
>            Assignee: Robert Nettleton
>            Priority: Critical
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-17811.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The LogSearch integration in the Ambari REST layer uses a "searchEngine" interface to abstract out the calls to the LogSearch Server, in order to handle search query requests.  
> If LogSearch is not running, and a REST GET call is made on the following Ambari resource:
> {code}clusters/$CLUSTER_NAME/logging/searchEngine{code}
> The following NullPointerException will be thrown in ambari-server.log:
> {code}
> java.lang.NullPointerException
>         at org.apache.ambari.server.api.services.LoggingService.handleDirectRequest(LoggingService.java:113)
>         at org.apache.ambari.server.api.services.LoggingService.getSearchEngine(LoggingService.java:76)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {code}
> The Ambari LogSearch integration should handle this type of failure more gracefully.  In the event that this REST resource is accessed when LogSearch is not running, or is not deployed, then a check for a null LoggingRequestHelper should be implemented, and a reasonable error message returned to the caller, to indicate that the "searchEngine" resource is not currently available.  
> I'm working on a fix for this, and will be submitting a patch shortly. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)