AMBARI-21482. Blueprints: HSI config 'num_llap_nodes' and 'num_llap_nodes_for_llap_daemons' should be calculated and recommended via Stack Advisor during Blueprint install only if 'num_llap_nodes' config value is not provided in Blueprint.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e799f522 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e799f522 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e799f522 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: e799f52268db9330a84b1e982b3b88e591b04649 Parents: c7f4228 Author: Swapan Shridhar <sshrid...@hortonworks.com> Authored: Fri Jul 14 18:15:52 2017 -0700 Committer: Swapan Shridhar <sshrid...@hortonworks.com> Committed: Fri Jul 14 22:27:56 2017 -0700 ---------------------------------------------------------------------- .../main/resources/stacks/HDP/2.5/services/stack_advisor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e799f522/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py index 4ca74ee..1c19d8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py @@ -1013,8 +1013,10 @@ class HDP25StackAdvisor(HDP24StackAdvisor): # Set 'num_llap_nodes_requested' for 1st invocation, as it gets passed as 1 otherwise, read from config. # Check if its : 1. 1st invocation from UI ('enable_hive_interactive' in changed-configurations) - # OR 2. 1st invocation from BP (services['changed-configurations'] should be empty in this case) - if (changed_configs_has_enable_hive_int or 0 == len(services['changed-configurations'])) \ + # OR 2. 1st invocation from BP (services['changed-configurations'] should be empty in this case and 'num_llap_nodes' not defined) + if (changed_configs_has_enable_hive_int + or (0 == len(services['changed-configurations']) + and not services['configurations']['hive-interactive-env']['properties']['num_llap_nodes'])) \ and services['configurations']['hive-interactive-env']['properties']['enable_hive_interactive']: num_llap_nodes_requested = min_nodes_required else: