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



The first 5 rows of the function are also unnecessary if the condition is not 
met (i.e. there is no LOGSEARCH service with logsearch-properties), so it's 
misleading.
I'd do it like this:

def recommendLogsearchConfigurations(self, configurations, clusterData, 
services, hosts):
    servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
    include_logsearch = "LOGSEARCH" in servicesList
    if include_logsearch and "logsearch-properties" in 
services["configurations"]:
      <rest of the function>

- Miklos Gergely


On May 4, 2016, 3:30 p.m., Oliver Szabo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46981/
> -----------------------------------------------------------
> 
> (Updated May 4, 2016, 3:30 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Miklos Gergely, Robert Nettleton, 
> and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-16255
>     https://issues.apache.org/jira/browse/AMBARI-16255
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Basic stack advisor recommendation for sharding and replication.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
>  dc5ebb6 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> 7b792b9 
>   ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 
> 2080c52 
> 
> Diff: https://reviews.apache.org/r/46981/diff/
> 
> 
> Testing
> -------
> 
> Total run:1014
> Total errors:0
> Total failures:0
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>

Reply via email to