|
@@ -3101,106 +3101,7 @@ class TestHDP25StackAdvisor(TestCase):
|
|
|
self.assertEquals(configurations['hive-interactive-site']['properties'],
|
|
|
expected_hive_interactive_site_empty['hive-interactive-site']['properties'])
|
|
|
|
|
|
- def test_recommendAtlasConfigurations(self):
|
|
|
- self.maxDiff = None
|
|
|
- configurations = {
|
|
|
- "application-properties": {
|
|
|
- "properties": {
|
|
|
- "atlas.graph.index.search.solr.zookeeper-url": ""
|
|
|
- }
|
|
|
- },
|
|
|
- "logsearch-solr-env": {
|
|
|
- "properties": {
|
|
|
- "logsearch_solr_znode": "/logsearch"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- clusterData = {
|
|
|
- "cpu": 4,
|
|
|
- "mapMemory": 3000,
|
|
|
- "amMemory": 2000,
|
|
|
- "reduceMemory": 2056,
|
|
|
- "containers": 3,
|
|
|
- "ramPerContainer": 256
|
|
|
- }
|
|
|
- expected = {
|
|
|
- 'application-properties': {
|
|
|
- 'properties': {
|
|
|
- 'atlas.graph.index.search.solr.zookeeper-url': '{{zookeeper_quorum}}/logsearch',
|
|
|
- }
|
|
|
- },
|
|
|
- "logsearch-solr-env": {
|
|
|
- "properties": {
|
|
|
- "logsearch_solr_znode": "/logsearch"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- services = {
|
|
|
- "services": [
|
|
|
- {
|
|
|
- "href": "/api/v1/stacks/HDP/versions/2.2/services/ATLAS",
|
|
|
- "StackServices": {
|
|
|
- "service_name": "LOGSEARCH",
|
|
|
- "service_version": "2.6.0.2.2",
|
|
|
- "stack_name": "HDP",
|
|
|
- "stack_version": "2.3"
|
|
|
- },
|
|
|
- "components": [
|
|
|
- {
|
|
|
- "StackServiceComponents": {
|
|
|
- "advertise_version": "false",
|
|
|
- "cardinality": "1",
|
|
|
- "component_category": "MASTER",
|
|
|
- "component_name": "LOGSEARCH_SOLR",
|
|
|
- "display_name": "solr",
|
|
|
- "is_client": "false",
|
|
|
- "is_master": "true",
|
|
|
- "hostnames": []
|
|
|
- },
|
|
|
- "dependencies": []
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- ],
|
|
|
- "configurations": {
|
|
|
- "application-properties": {
|
|
|
- "properties": {
|
|
|
- "atlas.graph.index.search.solr.zookeeper-url": ""
|
|
|
- }
|
|
|
- },
|
|
|
- "logsearch-solr-env": {
|
|
|
- "properties": {
|
|
|
- "logsearch_solr_znode": "/logsearch"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "changed-configurations": [ ]
|
|
|
-
|
|
|
- }
|
|
|
- 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
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
-
|
|
|
- self.stackAdvisor.recommendAtlasConfigurations(configurations, clusterData, services, hosts)
|
|
|
- self.assertEquals(configurations, expected)
|
|
|
|
|
|
- services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'}
|
|
|
- self.stackAdvisor.recommendAtlasConfigurations(configurations, clusterData, services, hosts)
|
|
|
- self.assertEquals(configurations, expected)
|
|
|
|
|
|
|
|
|
# Test 13: (1). 'default' and 'llap' (State : RUNNING) queue exists at root level in capacity-scheduler, and
|
|
@@ -3419,6 +3320,107 @@ class TestHDP25StackAdvisor(TestCase):
|
|
|
self.assertEquals(configurations['hive-interactive-env']['property_attributes']['llap_queue_capacity'], expected_visibility_false)
|
|
|
|
|
|
|
|
|
+ def test_recommendAtlasConfigurations(self):
|
|
|
+ self.maxDiff = None
|
|
|
+ configurations = {
|
|
|
+ "application-properties": {
|
|
|
+ "properties": {
|
|
|
+ "atlas.graph.index.search.solr.zookeeper-url": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "logsearch-solr-env": {
|
|
|
+ "properties": {
|
|
|
+ "logsearch_solr_znode": "/logsearch"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ clusterData = {
|
|
|
+ "cpu": 4,
|
|
|
+ "mapMemory": 3000,
|
|
|
+ "amMemory": 2000,
|
|
|
+ "reduceMemory": 2056,
|
|
|
+ "containers": 3,
|
|
|
+ "ramPerContainer": 256
|
|
|
+ }
|
|
|
+ expected = {
|
|
|
+ 'application-properties': {
|
|
|
+ 'properties': {
|
|
|
+ 'atlas.graph.index.search.solr.zookeeper-url': '{{zookeeper_quorum}}/logsearch',
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "logsearch-solr-env": {
|
|
|
+ "properties": {
|
|
|
+ "logsearch_solr_znode": "/logsearch"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ services = {
|
|
|
+ "services": [
|
|
|
+ {
|
|
|
+ "href": "/api/v1/stacks/HDP/versions/2.2/services/ATLAS",
|
|
|
+ "StackServices": {
|
|
|
+ "service_name": "LOGSEARCH",
|
|
|
+ "service_version": "2.6.0.2.2",
|
|
|
+ "stack_name": "HDP",
|
|
|
+ "stack_version": "2.3"
|
|
|
+ },
|
|
|
+ "components": [
|
|
|
+ {
|
|
|
+ "StackServiceComponents": {
|
|
|
+ "advertise_version": "false",
|
|
|
+ "cardinality": "1",
|
|
|
+ "component_category": "MASTER",
|
|
|
+ "component_name": "LOGSEARCH_SOLR",
|
|
|
+ "display_name": "solr",
|
|
|
+ "is_client": "false",
|
|
|
+ "is_master": "true",
|
|
|
+ "hostnames": []
|
|
|
+ },
|
|
|
+ "dependencies": []
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ "configurations": {
|
|
|
+ "application-properties": {
|
|
|
+ "properties": {
|
|
|
+ "atlas.graph.index.search.solr.zookeeper-url": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "logsearch-solr-env": {
|
|
|
+ "properties": {
|
|
|
+ "logsearch_solr_znode": "/logsearch"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "changed-configurations": [ ]
|
|
|
+
|
|
|
+ }
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ self.stackAdvisor.recommendAtlasConfigurations(configurations, clusterData, services, hosts)
|
|
|
+ self.assertEquals(configurations, expected)
|
|
|
+
|
|
|
+ services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'}
|
|
|
+ self.stackAdvisor.recommendAtlasConfigurations(configurations, clusterData, services, hosts)
|
|
|
+ self.assertEquals(configurations, expected)
|
|
|
+
|
|
|
"""
|
|
|
Helper method to convert string of key-values to dict.
|
|
|
"""
|