You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2016/06/20 12:56:15 UTC

ambari git commit: Revert "AMBARI-17286 Service config links should use public host name (zhewang)"

Repository: ambari
Updated Branches:
  refs/heads/trunk ac8adabb3 -> 317f5c0be


Revert "AMBARI-17286 Service config links should use public host name (zhewang)"

This reverts commit 54d76f5b8fe9d1b6fbcbab1732267b7e13413118.


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

Branch: refs/heads/trunk
Commit: 317f5c0be2d0f64ebc398d6b14ad8bf8a35e7c11
Parents: ac8adab
Author: oleewere <ol...@gmail.com>
Authored: Mon Jun 20 14:50:19 2016 +0200
Committer: oleewere <ol...@gmail.com>
Committed: Mon Jun 20 14:50:19 2016 +0200

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/stack_advisor.py    |   3 -
 .../stacks/HDP/2.3/services/stack_advisor.py    |   3 -
 .../stacks/2.2/common/test_stack_advisor.py     | 138 +------------------
 .../stacks/2.3/common/test_stack_advisor.py     |   3 -
 ambari-server/src/test/python/unitTests.py      |   4 +-
 5 files changed, 5 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/317f5c0b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 753c692..038a6c3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -774,9 +774,6 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
     latest_tez_jar_version = None
 
     server_host = socket.getfqdn()
-    for host in hosts["items"]:
-      if server_host == host["Hosts"]["host_name"]:
-        server_host = host["Hosts"]["public_host_name"]
     server_port = '8080'
     server_protocol = 'http'
     views_dir = '/var/lib/ambari-server/resources/views/'

http://git-wip-us.apache.org/repos/asf/ambari/blob/317f5c0b/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 6a3df08..c32306d 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
@@ -98,9 +98,6 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
     latest_tez_jar_version = None
 
     server_host = socket.getfqdn()
-    for host in hosts["items"]:
-      if server_host == host["Hosts"]["host_name"]:
-        server_host = host["Hosts"]["public_host_name"]
     server_port = '8080'
     server_protocol = 'http'
     views_dir = '/var/lib/ambari-server/resources/views/'

http://git-wip-us.apache.org/repos/asf/ambari/blob/317f5c0b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index c6220bc..985e010 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -112,60 +112,14 @@ class TestHDP22StackAdvisor(TestCase):
     services = {
       "ambari-server-properties": {}
     }
-    hosts = {
-      "items" : [
-        {
-          "href" : "/api/v1/hosts/c6401.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6401.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6401.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6402.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6402.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6402.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6403.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6403.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6403.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        }
-      ]
-    }
 
     server_host = socket.getfqdn()
-    for host in hosts["items"]:
-      if server_host == host["Hosts"]["host_name"]:
-        server_host = host["Hosts"]["public_host_name"]
     tez_ui_url =  "http://" + server_host + ":8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"
 
     services['ambari-server-properties'] = {'api.ssl': 'false'}
     expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = tez_ui_url
 
-    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
+    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, None)
     self.assertEquals(configurations, expected)
 
   def test_recommendTezConfigurations_amMemoryMoreThan3072(self):
@@ -205,51 +159,8 @@ class TestHDP22StackAdvisor(TestCase):
     services = {
       "ambari-server-properties": {}
     }
-    hosts = {
-      "items" : [
-        {
-          "href" : "/api/v1/hosts/c6401.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6401.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6401.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6402.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6402.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6402.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6403.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6403.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6403.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        }
-      ]
-    }
 
-    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
+    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, None)
     self.assertEquals(configurations, expected)
 
   def test_recommendTezConfigurations_mapMemoryLessThan768(self):
@@ -289,51 +200,8 @@ class TestHDP22StackAdvisor(TestCase):
     services = {
       "ambari-server-properties": {}
     }
-    hosts = {
-      "items" : [
-        {
-          "href" : "/api/v1/hosts/c6401.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6401.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6401.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6402.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6402.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6402.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        },
-        {
-          "href" : "/api/v1/hosts/c6403.ambari.apache.org",
-          "Hosts" : {
-            "cpu_count" : 1,
-            "host_name" : "c6403.ambari.apache.org",
-            "os_arch" : "x86_64",
-            "os_type" : "centos6",
-            "ph_cpu_count" : 1,
-            "public_host_name" : "c6403.ambari.apache.org",
-            "rack_info" : "/default-rack",
-            "total_mem" : 1922680
-          }
-        }
-      ]
-    }
 
-    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
+    self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, None)
     self.assertEquals(configurations, expected)
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/317f5c0b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
index 9d830da..1bd385f 100644
--- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
@@ -1951,9 +1951,6 @@ class TestHDP23StackAdvisor(TestCase):
     self.assertEquals(configurations, expected)
 
     server_host = socket.getfqdn()
-    for host in hosts["items"]:
-      if server_host == host["Hosts"]["host_name"]:
-        server_host = host["Hosts"]["public_host_name"]
     tez_ui_url =  "http://" + server_host + ":8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"
 
     # Test JDK1.7

http://git-wip-us.apache.org/repos/asf/ambari/blob/317f5c0b/ambari-server/src/test/python/unitTests.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py
index 44ae997..b010804 100644
--- a/ambari-server/src/test/python/unitTests.py
+++ b/ambari-server/src/test/python/unitTests.py
@@ -35,8 +35,8 @@ from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 STACK_EXCLUDE = ["utils", "1.3.2"]
 SERVICE_EXCLUDE = ["configs"]
 
-TEST_MASK = 'test_stack_advisor.py'
-CUSTOM_TEST_MASK = '[Tt]est*.py'
+TEST_MASK = '[Tt]est*.py'
+CUSTOM_TEST_MASK = '_[Tt]est*.py'
 
 oldtmpdirpath = tempfile.gettempdir()
 newtmpdirpath = os.path.join(oldtmpdirpath, "ambari-test")