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




ambari-web/app/mixins/wizard/assign_master_components.js (line 872)
<https://reviews.apache.org/r/43430/#comment180668>

    This seems like it returns the host that matches the condition on line 874. 
Can we convine them together?
    pseudo code
    ```
    for (host in recommendedHostsForMaster){
      if !masterHostList.contains(host) {
        return host;
      }
    }
    ```


- jun aoki


On Feb. 16, 2016, 7:33 p.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43430/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2016, 7:33 p.m.)
> 
> 
> Review request for Ambari, Alexander Denissov, Alejandro Fernandez, Aleksandr 
> Kovalenko, Alexandr Antonenko, bhuvnesh chaudhary, Goutam Tadi, Jaimin Jetly, 
> jun aoki, Lav Jain, Newton Alex, Oleksandr Diachenko, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-14987
>     https://issues.apache.org/jira/browse/AMBARI-14987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On the assign masters page for the wizard, recommendations are not shown for 
> a master component that is being added for an installed service.
> 
> This happens while adding HAWQSTANDBY to the cluster using the 'Add 
> HAWQSTANDBY' wizard (situation: HAWQ service is already installed on the 
> cluster).
> 
> The function getHostForMaster used to return the next available host for the 
> master.
> For example:
> Case 1: component C1 is NOT installed on any hosts.
> getHostForMaster would return the first host from the allHosts list.
> Case 2: component C2 is installed on host H1
> getHostForMaster would return next available host from the allHosts list.
> If allHosts = ['H1', 'H2', 'H3']. It would return H2
> 
> To avoid just placing the component on the next available host, the 
> recommendation is considered.
> Current implementation:
> If a host is recommended for the master, place it on that host (if it is not 
> already installed on that host).
> If no recommendation is given, place it on the next available host.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/assets/test/tests.js 9d5cbc1 
>   ambari-web/app/mixins/wizard/assign_master_components.js f6d1b1a 
>   ambari-web/test/mixins/wizard/assign_master_components_test.js PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/43430/diff/
> 
> 
> Testing
> -------
> 
> Manually Tested.
> 
> Tested assign_master page on cluster installation, add service wizard, enable 
> namenode wizard and add hawq standby wizard.
> 
> Unit test added:
>   10410 tests complete (9 seconds)
>   121 tests pending
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 54.125 s
> [INFO] Finished at: 2016-02-12T23:58:05-08:00
> [INFO] Final Memory: 12M/311M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Matt
> 
>

Reply via email to