Repository: ambari Updated Branches: refs/heads/branch-2.4 8721b56f8 -> d4cce2090
AMBARI-16171. Changes to Phoenix QueryServer Kerberos configuration - test fixes (Josh Elser via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4cce209 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4cce209 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4cce209 Branch: refs/heads/branch-2.4 Commit: d4cce20903324ccc09c1e5d7f757c82743e1f953 Parents: 8721b56 Author: Srimanth Gunturi <sgunt...@hortonworks.com> Authored: Fri May 27 16:25:27 2016 -0700 Committer: Srimanth Gunturi <sgunt...@hortonworks.com> Committed: Fri May 27 16:26:05 2016 -0700 ---------------------------------------------------------------------- .../stacks/HDP/2.5/services/stack_advisor.py | 4 ++-- .../stacks/2.5/common/test_stack_advisor.py | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4cce209/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 4d1dd16..837a446 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 @@ -228,8 +228,8 @@ class HDP25StackAdvisor(HDP24StackAdvisor): def get_phoenix_query_server_hosts(self, services, hosts): if len(hosts['items']) > 0: phoenix_query_server_hosts = self.getHostsWithComponent("HBASE", "PHOENIX_QUERY_SERVER", services, hosts) - assert (phoenix_query_server_hosts is not None), "Information about PHOENIX_QUERY_SERVER not found in cluster." - host_names = [] + if phoenix_query_server_hosts is None: + return [] return [host['Hosts']['host_name'] for host in phoenix_query_server_hosts] def recommendHIVEConfigurations(self, configurations, clusterData, services, hosts): http://git-wip-us.apache.org/repos/asf/ambari/blob/d4cce209/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 ca4cb82..3f5da61 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 @@ -5112,7 +5112,7 @@ class TestHDP25StackAdvisor(TestCase): -def test_recommendAtlasConfigurations(self): + def test_recommendAtlasConfigurations(self): self.maxDiff = None configurations = { "application-properties": { @@ -5285,6 +5285,11 @@ def test_recommendAtlasConfigurations(self): } ] }, + { + "StackServices": { + "service_name": "KERBEROS", + }, + }, ], "configurations": configurations, "changed-configurations": [ ] @@ -5404,6 +5409,11 @@ def test_recommendAtlasConfigurations(self): } ] }, + { + "StackServices": { + "service_name": "KERBEROS", + }, + }, ], "configurations": configurations, "changed-configurations": [ ] @@ -5455,6 +5465,7 @@ def test_recommendAtlasConfigurations(self): self.assertTrue('core-site' in configurations) self.assertTrue('properties' in configurations['core-site']) + self.assertTrue('hadoop.proxyuser.HTTP.hosts' in configurations['core-site']['properties']) # Avoid an unnecessary sort in the stack advisor, sort here for easy comparison actualHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts'] expectedHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts'] @@ -5525,6 +5536,11 @@ def test_recommendAtlasConfigurations(self): } ] }, + { + "StackServices": { + "service_name": "KERBEROS", + }, + }, ], "configurations": configurations, "changed-configurations": [ ]