ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 31999: Querying For Requests By Task Status Has Poor Performance
Date Thu, 12 Mar 2015 19:16:40 GMT

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

Ship it!


Ship It!

- Tom Beerbower


On March 12, 2015, 6:57 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31999/
> -----------------------------------------------------------
> 
> (Updated March 12, 2015, 6:57 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10050
>     https://issues.apache.org/jira/browse/AMBARI-10050
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari tries to retrieve Requests for a given RequestStatus (IN_PROGRESS, COMPLETED,
FAILED) by using the sum of the collected states of all child task statuses. 
> 
> The query that was being used was a mess. 
> 
> Essentially, COMPLETED is the only status that is hard. The other statuses of IN_PROGRESS
or FAILED just need to have a single task that is in those states, while COMPLETED means that
_all_ tasks must be COMPLETED.
> 
> I broke this out into 2 different queries and got rid of the crazy cartesian product
on the query with the nested SELECT.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
bd4f2d8 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleStatus.java
7c7e8cd 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
f9d21ad 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java 9d538f7

> 
> Diff: https://reviews.apache.org/r/31999/diff/
> 
> 
> Testing
> -------
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 37:59 min
> [INFO] Finished at: 2015-03-12T14:43:47-04:00
> [INFO] Final Memory: 29M/461M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message