You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/01/04 22:38:28 UTC
[35/50] [abbrv] ambari git commit: AMBARI-14412. Recommend PXF
component to be collocated with NAMENODE and DATANODE (mithmatt via
odiachenko).
http://git-wip-us.apache.org/repos/asf/ambari/blob/c96a9e41/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 67ac25f..aa7688b 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