ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-1996) Request resource provider handler unnecessarily queries host_role_command table.
Date Tue, 23 Apr 2013 17:57:17 GMT
Tom Beerbower created AMBARI-1996:
-------------------------------------

             Summary: Request resource provider handler unnecessarily queries host_role_command
table.
                 Key: AMBARI-1996
                 URL: https://issues.apache.org/jira/browse/AMBARI-1996
             Project: Ambari
          Issue Type: Bug
            Reporter: Tom Beerbower
            Assignee: Tom Beerbower


A request for a Request resource calls through the resource provider to the AmbariManagementControllerImpl
to get the resource.  In RequestResourceProvider ...

{code}
getManagementController().getRequestStatus(finalRequest);
{code} 

The AMC code queries the db for the related tasks and returns them in the response to the
resource provider.  The resource provider ignores them.  In the case of the following request
...

{code}
/api/v1/clusters/c1/requests/10
{code}

... the API framework will request the Request resource '10' and then its sub resources (Tasks)
in a separate request.  This means that the query for the tasks is being done multiple times
for a single API request (at least once through the RequestResourceProvider and once through
the TaskResourceProvider).  

The call to getResources() on the RequestResourceProvider should only populate the Request
resource and not the associated tasks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message