ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject [1/3] ambari git commit: AMBARI-14412. Recommend PXF component to be collocated with NAMENODE and DATANODE (mithmatt via odiachenko).
Date Wed, 30 Dec 2015 19:37:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 5983b9b23 -> dcde3a4d2


http://git-wip-us.apache.org/repos/asf/ambari/blob/dcde3a4d/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 f018819..7d95d24 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
@@ -152,6 +152,19 @@ class TestHDP23StackAdvisor(TestCase):
     self.assertFalse('HAWQSEGMENT' in recommendedComponents)
 
 
+  def test_createComponentLayoutRecommendations_pxf_co_locate_with_namenode_or_datanode(self):
+    """ Test that PXF gets recommended on same host group which has NAMENODE or DATANODE"""
+
+    services = self.load_json("services-pxf-hdfs.json")
+    hosts = self.load_json("hosts-3-hosts.json")
+    recommendations = self.stackAdvisor.createComponentLayoutRecommendations(services, hosts)
+
+    for hostgroup in recommendations["blueprint"]["host_groups"]:
+      component_names = [component["name"] for component in hostgroup["components"]]
+      if "NAMENODE" in component_names or "DATANODE" in component_names:
+        self.assertTrue("PXF" in component_names)
+
+
   def fqdn_mock_result(value=None):
       return 'c6401.ambari.apache.org' if value is None else value
 


Mime
View raw message