|
@@ -424,6 +424,58 @@ class TestHDP26StackAdvisor(TestCase):
|
|
|
'druid.broker.jvm.heap.memory': {'maximum': '49152'}}}}
|
|
|
)
|
|
|
|
|
|
+
|
|
|
+ def test_recommendDruidConfigurations_property_existence_check(self):
|
|
|
+ # Test for https://issues.apache.org/jira/browse/AMBARI-19144
|
|
|
+ hosts = {
|
|
|
+ "items": [
|
|
|
+ {
|
|
|
+ "Hosts": {
|
|
|
+ "cpu_count": 4,
|
|
|
+ "total_mem": 50331648,
|
|
|
+ "disk_info": [
|
|
|
+ {"mountpoint": "/"},
|
|
|
+ {"mountpoint": "/dev/shm"},
|
|
|
+ {"mountpoint": "/vagrant"},
|
|
|
+ {"mountpoint": "/"},
|
|
|
+ {"mountpoint": "/dev/shm"},
|
|
|
+ {"mountpoint": "/vagrant"}
|
|
|
+ ],
|
|
|
+ "public_host_name": "c6401.ambari.apache.org",
|
|
|
+ "host_name": "c6401.ambari.apache.org"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ services = {
|
|
|
+ "Versions": {
|
|
|
+ "parent_stack_version": "2.5",
|
|
|
+ "stack_name": "HDP",
|
|
|
+ "stack_version": "2.6",
|
|
|
+ "stack_hierarchy": {
|
|
|
+ "stack_name": "HDP",
|
|
|
+ "stack_versions": ["2.5", "2.4", "2.3", "2.2", "2.1", "2.0.6"]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "services": [{
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "configurations": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ clusterData = {
|
|
|
+ }
|
|
|
+
|
|
|
+ configurations = {
|
|
|
+ }
|
|
|
+
|
|
|
+ self.stackAdvisor.recommendDruidConfigurations(configurations, clusterData, services, hosts)
|
|
|
+ self.assertEquals(configurations,
|
|
|
+ {}
|
|
|
+ )
|
|
|
+
|
|
|
def test_recommendDruidConfigurations_heterogeneous_hosts(self):
|
|
|
hosts = {
|
|
|
"items": [
|