ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-13657 Stack adviser error during using custom config group (dsen)
Date Fri, 30 Oct 2015 14:22:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0e80a853b -> 06c481581


AMBARI-13657 Stack adviser error during using custom config group (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/06c48158
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/06c48158
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/06c48158

Branch: refs/heads/trunk
Commit: 06c481581a645b7fd81b733d9976dbd042fc440e
Parents: 0e80a85
Author: Dmytro Sen <dsen@apache.org>
Authored: Fri Oct 30 16:21:24 2015 +0200
Committer: Dmytro Sen <dsen@apache.org>
Committed: Fri Oct 30 16:21:24 2015 +0200

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.3/services/stack_advisor.py    | 10 ++++------
 .../python/stacks/2.0.6/HIVE/test_hive_service_check.py   |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/06c48158/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 1d1cdba..c7478ff 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -284,26 +284,24 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
         hooks_value = " "
     putHiveSiteProperty(hooks_property, hooks_value)
 
-    if include_atlas:
+    atlas_server_host_info = self.getHostWithComponent("ATLAS", "ATLAS_SERVER", services,
hosts)
+    if include_atlas and atlas_server_host_info:
       cluster_name = 'default'
       putHiveSiteProperty('atlas.cluster.name', cluster_name)
-      metadata_host_info = self.getHostWithComponent("ATLAS", "ATLAS_SERVER", services, hosts)
-      metadata_host = metadata_host_info['Hosts']['host_name']
+      atlas_rest_host = atlas_server_host_info['Hosts']['host_name']
       scheme = "http"
       metadata_port = "21000"
-      tls_enabled = "false"
       if 'application-properties' in services['configurations']:
         tls_enabled = services['configurations']['application-properties']['properties']['atlas.enableTLS']
         metadata_port =  services['configurations']['application-properties']['properties']['atlas.server.http.port']
         if tls_enabled.lower() == "true":
           scheme = "https"
           metadata_port =  services['configurations']['application-properties']['properties']['atlas.server.https.port']
-      putHiveSiteProperty('atlas.rest.address', '{0}://{1}:{2}'.format(scheme, metadata_host,
metadata_port))
+      putHiveSiteProperty('atlas.rest.address', '{0}://{1}:{2}'.format(scheme, atlas_rest_host,
metadata_port))
     else:
       putHiveSitePropertyAttribute('atlas.cluster.name', 'delete', 'true')
       putHiveSitePropertyAttribute('atlas.rest.address', 'delete', 'true')
 
-
   def recommendHDFSConfigurations(self, configurations, clusterData, services, hosts):
     super(HDP23StackAdvisor, self).recommendHDFSConfigurations(configurations, clusterData,
services, hosts)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/06c48158/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
index b755d46..9f0cb3b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
@@ -41,7 +41,7 @@ class TestServiceCheck(RMFTestCase):
                         hdp_stack_version = self.STACK_VERSION,
                         target = RMFTestCase.TARGET_COMMON_SERVICES
     )
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;transportMode=binary;auth=noSasl'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;transportMode=binary;auth=noSasl'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL' -e 'Error'",
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               user = 'ambari-qa',
                               timeout = 30,
@@ -155,7 +155,7 @@ class TestServiceCheck(RMFTestCase):
     self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab
ambari-qa@EXAMPLE.COM; ',
                               user = 'ambari-qa',
                               )
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;transportMode=binary;principal=hive/_HOST@EXAMPLE.COM'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;transportMode=binary;principal=hive/_HOST@EXAMPLE.COM'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL' -e 'Error'",
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               user = 'ambari-qa',
                               timeout = 30,
@@ -271,7 +271,7 @@ class TestServiceCheck(RMFTestCase):
       hdp_stack_version = self.STACK_VERSION,
       target = RMFTestCase.TARGET_COMMON_SERVICES)
 
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10010/;transportMode=binary'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10010/;transportMode=binary'
-e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL' -e 'Error'",
       path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
       timeout = 30,
       user = 'ambari-qa')


Mime
View raw message