----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40494/#review107245 -----------------------------------------------------------
Ship it! ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java (lines 133 - 134) <https://reviews.apache.org/r/40494/#comment166268> This seems kind of funny. For now there will only be one cluster name, but why are we looping here just to retrieve it (potentially) over and over again? - Robert Levas On Nov. 19, 2015, 2:53 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40494/ > ----------------------------------------------------------- > > (Updated Nov. 19, 2015, 2:53 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Jayush Luniya, Nate Cole, > Robert Levas, Robert Nettleton, Sumit Mohanty, and Sid Wagle. > > > Bugs: AMBARI-13974 > https://issues.apache.org/jira/browse/AMBARI-13974 > > > Repository: ambari > > > Description > ------- > > STR: > - Launch Rolling Upgrade on big cluster (500+ node) > > This call fails due to timeout. No failed Service Checks shown to user. > > {code} > /api/v1/clusters/c500/upgrades/69/upgrade_groups?upgrade_items/UpgradeItem/status=COMPLETED&upgrade_items/tasks/Tasks/status.in(FAILED,ABORTED,TIMEDOUT)&upgrade_items/tasks/Tasks/command=SERVICE_CHECK&fields=upgrade_items/tasks/Tasks/command_detail,upgrade_items/tasks/Tasks/status&minimal_response=true > {code} > > The root of the problem is how the REST API handles subqueries. For every > group that matches, it will attempt to retrieve every stage and every task > and then produce a slice of results from in-memory comparison. > > This should really go through the JPA layer since it's simple comparisons on > DB fields. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java > 873261f > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java > 5646156 > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java > f168ac6 > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleCommand.java > cd2e528 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java > 0eef06c > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java > 2001a7d > > ambari-server/src/main/java/org/apache/ambari/server/controller/TaskStatusRequest.java > c966e7f > > ambari-server/src/main/java/org/apache/ambari/server/controller/TaskStatusResponse.java > 892b1c3 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java > 1806b78 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java > 5db8c42 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity_.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity_.java > 4dad21a > > ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java > 4a80c4f > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java > 45ab2df > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java > 6feb2cc > > Diff: https://reviews.apache.org/r/40494/diff/ > > > Testing > ------- > > Running installation and upgrade sanity checks. > > Tests run: 3412, Failures: 0, Errors: 0, Skipped: 27 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 29:15 min > [INFO] Finished at: 2015-11-19T14:50:52-05:00 > [INFO] Final Memory: 49M/657M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Jonathan Hurley > >