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/20768014 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20768014 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20768014 Branch: refs/heads/branch-feature-AMBARI-21348 Commit: 207680147edc50336bae04914976e6221bc6fd95 Parents: 4ddbd62 Author: Swapan Shridhar <[email protected]> Authored: Fri Jul 14 18:15:52 2017 -0700 Committer: Swapan Shridhar <[email protected]> Committed: Fri Jul 14 22:29:23 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/20768014/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 97c49f3..9971bfa 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 @@ -1014,8 +1014,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:
