> On June 6, 2017, 5:38 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/stacks/stack_advisor.py
> > Lines 759 (patched)
> > <https://reviews.apache.org/r/59838/diff/1/?file=1742546#file1742546line759>
> >
> >     Can you provide an example of why this has to be sorted?

Hi Alejandro,

In the function def getFilteredHostsBasedOnDependencies, you can see that it 
uses the hostsComponentsMap to determine which hosts a given component will be 
installed on.  If the services are not processed in dependency order then you 
might process HDFS before ZOOKEEPER and there would be no hosts where ZOOKEEPER 
will be installed.

            for host, hostComponents in hostsComponentsMap.iteritems():
              isRequiredIncluded = False
              for component in hostComponents:
                currentComponentName = None if "name" not in component else 
component["name"]
                if requiredComponentName == currentComponentName:
                  isRequiredIncluded = True
              if not isRequiredIncluded:
                removeHosts.append(host)


- Tim


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


On June 6, 2017, 11:33 a.m., Tim Thorpe wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59838/
> -----------------------------------------------------------
> 
> (Updated June 6, 2017, 11:33 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Di Li, Jaimin Jetly, Jonathan 
> Hurley, Jayush Luniya, and Nate Cole.
> 
> 
> Bugs: AMBARI-20122
>     https://issues.apache.org/jira/browse/AMBARI-20122
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> After resolution of AMBARI-19685, stack advisor validates if stack defined 
> dependency is not satisfied but recommendation API does not account for this.
> 
> Stack defined dependencies are service/component based and has a scope 
> CLUSTER|HOST.  
> 
> During recommendation the services to install have already been selected.  We 
> can't really utilize the cluster scope because either the dependent service 
> was selected or it was not.  If it was not selected it will be caught during 
> validation.  We can only recommend based on HOST scope.
> 
> This JIRA is also limited to only handling those which don't have conditional 
> dependencies.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/stacks/stack_advisor.py 4a81dc6 
>   ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py 
> 41c57f6 
> 
> 
> Diff: https://reviews.apache.org/r/59838/diff/1/
> 
> 
> Testing
> -------
> 
> Added new test case to test the recommendation of dependencies for slaves and 
> masters
> 
> mvn clean test -DskipSurefireTests
> 
> 
> New trunk without my change
> 
> Total run:1168
> Total errors:13
> Total failures:0
> 
> New trunk with my change
> 
> Total run:1169
> Total errors:13
> Total failures:0
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>

Reply via email to