From 4b4effa9c8062c26fafe2b9c20146bf67b44b2b5 Mon Sep 17 00:00:00 2001 From: Jeremy Freudberg Date: Thu, 5 Jul 2018 12:56:15 -0400 Subject: [PATCH] Switch hive_enable_db_notification's default value Make this change for CDH 5.13.0. And do so, such that the user may... * easily observe the new default value * easily override the new default value Change-Id: Ic2805ee0fb6bc2d96144e86b8a3f49beae3e1cef --- sahara/plugins/cdh/cloudera_utils.py | 6 ++++++ sahara/plugins/cdh/v5_13_0/cloudera_utils.py | 6 ++++++ .../plugins/cdh/v5_13_0/resources/hive-hivemetastore.json | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sahara/plugins/cdh/cloudera_utils.py b/sahara/plugins/cdh/cloudera_utils.py index b53afae70d..3a38ba71dc 100644 --- a/sahara/plugins/cdh/cloudera_utils.py +++ b/sahara/plugins/cdh/cloudera_utils.py @@ -627,6 +627,9 @@ class ClouderaUtils(object): yarn = cm_cluster.get_service(self.YARN_SERVICE_NAME) yield yarn.enable_rm_ha(new_rm_host_id=new_rm_host_name) + def _load_version_specific_instance_configs(self, instance, default_conf): + pass + def _get_configs(self, service, cluster=None, instance=None): def get_hadoop_dirs(mount_points, suffix): return ','.join([x + suffix for x in mount_points]) @@ -823,6 +826,9 @@ class ClouderaUtils(object): } } + self._load_version_specific_instance_configs( + instance, instance_default_confs) + ng_user_confs = self.pu.convert_process_configs( instance.node_group.node_configs) all_confs = s_cfg.merge_configs(all_confs, ng_user_confs) diff --git a/sahara/plugins/cdh/v5_13_0/cloudera_utils.py b/sahara/plugins/cdh/v5_13_0/cloudera_utils.py index d9ca851ffa..01637813dd 100644 --- a/sahara/plugins/cdh/v5_13_0/cloudera_utils.py +++ b/sahara/plugins/cdh/v5_13_0/cloudera_utils.py @@ -26,3 +26,9 @@ class ClouderaUtilsV5130(cu.ClouderaUtils): self.pu = pu.PluginUtilsV5130() self.validator = validation.ValidatorV5130 self.c_helper = config_helper.ConfigHelperV5130() + + def _load_version_specific_instance_configs(self, instance, default_conf): + if instance.node_group.node_configs.get('HIVEMETASTORE', {}).get( + 'hive_enable_db_notification', None) is None: + default_conf['HIVEMETASTORE']['hive_enable_db_notification'] = ( + 'true') diff --git a/sahara/plugins/cdh/v5_13_0/resources/hive-hivemetastore.json b/sahara/plugins/cdh/v5_13_0/resources/hive-hivemetastore.json index 60c716816b..85703c7a89 100644 --- a/sahara/plugins/cdh/v5_13_0/resources/hive-hivemetastore.json +++ b/sahara/plugins/cdh/v5_13_0/resources/hive-hivemetastore.json @@ -159,7 +159,7 @@ "desc": "Enable stored notifications of metadata changes. When enabled, each metadata change will be stored in NOTIFICATION_LOG.", "display_name": "Enable Stored Notifications in Database", "name": "hive_enable_db_notification", - "value": "false" + "value": "true" }, { "desc": "When set, this role's process is automatically (and transparently) restarted in the event of an unexpected failure.",