ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject [1/4] ambari git commit: AMBARI-14301: Co-locate HAWQSEGMENT on hosts that have DATANODE component (lavjain via jaoki)
Date Wed, 06 Jan 2016 01:49:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c0efc80d8 -> fe8a8d1e1


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe8a8d1e/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 aa7688b..22fcb1b 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
@@ -155,7 +155,7 @@ class TestHDP23StackAdvisor(TestCase):
   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")
+    services = self.load_json("services-hawq-pxf-hdfs.json")
     hosts = self.load_json("hosts-3-hosts.json")
     recommendations = self.stackAdvisor.createComponentLayoutRecommendations(services, hosts)
 
@@ -165,6 +165,19 @@ class TestHDP23StackAdvisor(TestCase):
         self.assertTrue("PXF" in component_names)
 
 
+  def test_hawqsegmentDatanode(self):
+    """ Test that HAWQSegment gets recommended on same host group which has DATANODE"""
+
+    services = self.load_json("services-hawq-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 'DATANODE' in component_names:
+        self.assertTrue('HAWQSEGMENT' in component_names)
+
+
   def fqdn_mock_result(value=None):
       return 'c6401.ambari.apache.org' if value is None else value
 


Mime
View raw message