ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Nettleton (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-17811) LogSearch search engine resource throws NullPointer when LogSearch not available
Date Wed, 20 Jul 2016 15:12:20 GMT
Robert Nettleton created AMBARI-17811:
-----------------------------------------

             Summary: 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


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)

Mime
View raw message