AMBARI-19184 Remove HSI host name from UI. (smohanty via atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc3c23a2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc3c23a2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc3c23a2 Branch: refs/heads/trunk Commit: bc3c23a23aadd59971c6e14fe6cdf5990ac71a45 Parents: c366922 Author: Andrii Tkach <atk...@apache.org> Authored: Wed Dec 14 12:51:04 2016 +0200 Committer: Andrii Tkach <atk...@apache.org> Committed: Wed Dec 14 12:51:04 2016 +0200 ---------------------------------------------------------------------- .../HIVE/configuration/hive-interactive-env.xml | 10 ------ .../HDP/2.5/services/HIVE/themes/theme.json | 30 +---------------- .../stacks/HDP/2.5/services/stack_advisor.py | 16 ++------- .../stacks/2.5/common/test_stack_advisor.py | 34 +++----------------- .../test/python/stacks/2.5/configs/hsi_ha.json | 1 - 5 files changed, 8 insertions(+), 83 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml index 7b20728..a1f6d22 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml @@ -43,16 +43,6 @@ <on-ambari-upgrade add="true"/> </property> <property> - <name>hive_server_interactive_host</name> - <value>localhost</value> - <description>The host that has been assigned to run HiveServer2 Interactive</description> - <display-name>HiveServer2 Interactive Host</display-name> - <value-attributes> - <overridable>false</overridable> - </value-attributes> - <on-ambari-upgrade add="true"/> - </property> - <property> <name>num_llap_nodes</name> <value>1</value> <description>The number of Hive LLAP daemons to run.</description> http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json index 1d50b6a..9caf51e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json @@ -19,28 +19,6 @@ "subsection-name": "interactive-query-row1-col1" }, { - "config": "hive-interactive-env/hive_server_interactive_host", - "subsection-name": "interactive-query-row1-col1", - "depends-on": [ - { - "configs":[ - "hive-interactive-env/enable_hive_interactive" - ], - "if": "${hive-interactive-env/enable_hive_interactive}", - "then": { - "property_value_attributes": { - "visible": true - } - }, - "else": { - "property_value_attributes": { - "visible": false - } - } - } - ] - }, - { "config": "hive-interactive-site/hive.llap.daemon.queue.name", "subsection-name": "interactive-query-row1-col1", "depends-on": [ @@ -206,12 +184,6 @@ } }, { - "config": "hive-interactive-env/hive_server_interactive_host", - "widget": { - "type": "label" - } - }, - { "config": "hive-interactive-site/hive.llap.daemon.queue.name", "widget": { "type": "combo" @@ -274,4 +246,4 @@ } ] } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/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 60c1cac..50f7b7f 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 @@ -387,17 +387,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): validationItems.append({"config-name": "enable_hive_interactive", "item": self.getErrorItem( "HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.")}) - if 'hive_server_interactive_host' in hive_site_env_properties: - hsi_host = hsi_hosts[0] - if hive_site_env_properties['hive_server_interactive_host'].lower() != hsi_host.lower(): - validationItems.append({"config-name": "hive_server_interactive_host", - "item": self.getErrorItem( - "HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.")}) - pass - if 'hive_server_interactive_host' not in hive_site_env_properties: - validationItems.append({"config-name": "hive_server_interactive_host", - "item": self.getErrorItem( - "HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.")}) pass else: @@ -700,7 +689,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): if len(hsi_hosts) > 0: hsi_host = hsi_hosts[0] putHiveInteractiveEnvProperty('enable_hive_interactive', 'true') - putHiveInteractiveEnvProperty('hive_server_interactive_host', hsi_host) # Update 'hive.llap.daemon.queue.name' property attributes if capacity scheduler is changed. if self.HIVE_INTERACTIVE_SITE in services['configurations']: @@ -1092,8 +1080,8 @@ class HDP25StackAdvisor(HDP24StackAdvisor): hive_server_interactive_heapsize = None hive_server_interactive_hosts = self.getHostsWithComponent("HIVE", "HIVE_SERVER_INTERACTIVE", services, hosts) if hive_server_interactive_hosts is None: - # If its None, read the base service HDFS's DATANODE node memory, as are host are considered homogenous. - hive_server_interactive_hosts = self.getHostsWithComponent("HDFS", "DATANODE", services, hosts) + # If its None, read the base service YARN's NODEMANAGER node memory, as are host are considered homogenous. + hive_server_interactive_hosts = self.getHostsWithComponent("YARN", "NODEMANAGER", services, hosts) if hive_server_interactive_hosts is not None and len(hive_server_interactive_hosts) > 0: host_mem = long(hive_server_interactive_hosts[0]["Hosts"]["total_mem"]) hive_server_interactive_heapsize = min(max(2048.0, 400.0*llap_concurrency), 3.0/8 * host_mem) http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py index 54fe42a..a7ccdfe 100644 --- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py @@ -445,13 +445,12 @@ class TestHDP25StackAdvisor(TestCase): def test_validateYarnConfigurations(self): properties = {'enable_hive_interactive': 'true', - 'hive_server_interactive_host': 'c6401.ambari.apache.org', 'hive.tez.container.size': '2048', "yarn.nodemanager.linux-container-executor.group": "hadoop"} recommendedDefaults = {'enable_hive_interactive': 'true', - "hive_server_interactive_host": "c6401.ambari.apache.org", "yarn.nodemanager.linux-container-executor.group": "hadoop"} + "yarn.nodemanager.linux-container-executor.group": "hadoop"} configurations = { "hive-interactive-env": { - "properties": {'enable_hive_interactive': 'true', "hive_server_interactive_host": "c6401.ambari.apache.org"} + "properties": {'enable_hive_interactive': 'true'} }, "hive-site": { "properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'} @@ -479,13 +478,11 @@ class TestHDP25StackAdvisor(TestCase): def test_validateHiveInteractiveEnvConfigurations(self): properties = {'enable_hive_interactive': 'true', - 'hive_server_interactive_host': 'c6401.ambari.apache.org', 'hive.tez.container.size': '2048'} - recommendedDefaults = {'enable_hive_interactive': 'true', - "hive_server_interactive_host": "c6401.ambari.apache.org"} + recommendedDefaults = {'enable_hive_interactive': 'true'} configurations = { "hive-interactive-env": { - "properties": {'enable_hive_interactive': 'true', 'hive_server_interactive_host': 'c6401.ambari.apache.org'} + "properties": {'enable_hive_interactive': 'true'} }, "hive-site": { "properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'} @@ -511,20 +508,6 @@ class TestHDP25StackAdvisor(TestCase): "properties": {"yarn.resourcemanager.work-preserving-recovery.enabled": "true"} } } - configurations3 = { - "hive-interactive-env": { - "properties": {'enable_hive_interactive': 'true', "hive_server_interactive_host": "c6402.ambari.apache.org"} - }, - "hive-site": { - "properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'} - }, - "hive-env": { - "properties": {"hive_security_authorization": "None"} - }, - "yarn-site": { - "properties": {"yarn.resourcemanager.work-preserving-recovery.enabled": "true"} - } - } services = self.load_json("services-normal-his-valid.json") res_expected = [ @@ -534,17 +517,10 @@ class TestHDP25StackAdvisor(TestCase): self.assertEquals(res, res_expected) res_expected = [ - {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.', 'type': 'configuration', 'config-name': 'enable_hive_interactive', 'level': 'ERROR'}, - {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.', 'type': 'configuration', 'config-name': 'hive_server_interactive_host', 'level': 'ERROR'} + {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.', 'type': 'configuration', 'config-name': 'enable_hive_interactive', 'level': 'ERROR'} ] res = self.stackAdvisor.validateHiveInteractiveEnvConfigurations(properties, recommendedDefaults, configurations2, services, {}) self.assertEquals(res, res_expected) - - res_expected = [ - {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.', 'type': 'configuration', 'config-name': 'hive_server_interactive_host', 'level': 'ERROR'} - ] - res = self.stackAdvisor.validateHiveInteractiveEnvConfigurations(properties, recommendedDefaults, configurations3, services, {}) - self.assertEquals(res, res_expected) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json b/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json index 7f95a35..def0e54 100644 --- a/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json +++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json @@ -416,7 +416,6 @@ "hive-interactive-env": { "content" : "con\ntent", "enable_hive_interactive" : "true", - "hive_server_interactive_host" : "c6401.ambari.apache.org", "llap_queue_capacity" : "0", "num_llap_nodes" : "1", "num_retries_for_checking_llap_status" : 2,