You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Yusaku Sako (JIRA)" <ji...@apache.org> on 2013/05/08 00:13:17 UTC

[jira] [Updated] (AMBARI-1996) Request resource provider handler unnecessarily queries host_role_command table.

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

Yusaku Sako updated AMBARI-1996:
--------------------------------

    Affects Version/s: 1.2.2
    
> 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
>    Affects Versions: 1.2.2
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>             Fix For: 1.2.3
>
>         Attachments: AMBARI-1996.patch
>
>
> 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