summaryrefslogtreecommitdiff
path: root/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py
diff options
context:
space:
mode:
Diffstat (limited to 'ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py')
-rw-r--r--ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py
index afdb7cf744..1ed4ce06dc 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/stack_advisor.py
@@ -362,14 +362,11 @@ class HDPWIN22StackAdvisor(HDPWIN21StackAdvisor):
putHiveSiteProperty("hive.exec.reducers.bytes.per.reducer", "67108864")
# CBO
- putHiveEnvProperty("cost_based_optimizer", "On")
- if str(configurations["hive-env"]["properties"]["cost_based_optimizer"]).lower() == "on":
- putHiveSiteProperty("hive.cbo.enable", "true")
- else:
- putHiveSiteProperty("hive.cbo.enable", "false")
- hive_cbo_enable = configurations["hive-site"]["properties"]["hive.cbo.enable"]
- putHiveSiteProperty("hive.stats.fetch.partition.stats", hive_cbo_enable)
- putHiveSiteProperty("hive.stats.fetch.column.stats", hive_cbo_enable)
+ if "hive-site" in services["configurations"] and "hive.cbo.enable" in services["configurations"]["hive-site"]["properties"]:
+ hive_cbo_enable = services["configurations"]["hive-site"]["properties"]["hive.cbo.enable"]
+ putHiveSiteProperty("hive.stats.fetch.partition.stats", hive_cbo_enable)
+ putHiveSiteProperty("hive.stats.fetch.column.stats", hive_cbo_enable)
+
putHiveSiteProperty("hive.compute.query.using.stats", "true")
# Interactive Query