ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-16923. Fix for getting the 'hive.llap.daemon.queue.name' config Property Attributes updated if there is a change in 'capacity-scheduler'.
Date Fri, 27 May 2016 17:42:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 74358ac85 -> e22e2cbbe


AMBARI-16923. Fix for getting the 'hive.llap.daemon.queue.name' config Property Attributes
updated if there is a change in 'capacity-scheduler'.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e22e2cbb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e22e2cbb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e22e2cbb

Branch: refs/heads/branch-2.4
Commit: e22e2cbbe86842e7198cd4c67ed06dd1a94eac93
Parents: 74358ac
Author: Swapan Shridhar <sshridhar@hortonworks.com>
Authored: Fri May 27 10:36:19 2016 -0700
Committer: Swapan Shridhar <sshridhar@hortonworks.com>
Committed: Fri May 27 10:42:34 2016 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.5/services/stack_advisor.py    |  74 ++--
 .../stacks/2.5/common/test_stack_advisor.py     | 354 ++++++++++++++++++-
 2 files changed, 388 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e22e2cbb/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 8c5351f..34bed51 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -218,20 +218,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
       if self.HIVE_INTERACTIVE_SITE in services['configurations'] and \
           'hive.llap.daemon.queue.name' in services['configurations'][self.HIVE_INTERACTIVE_SITE]['properties']:
         self.setLlapDaemonQueueNamePropAttributes(services, configurations)
-
-      # Check to see if 'cache' config HS2 'hive.llap.io.memory.size' has been modified by
user.
-      # 'cache' size >= 64m implies config 'hive.llap.io.enabled' set to true, else false
-      cache_size_per_node_in_changed_configs = self.are_config_props_in_changed_configs(services,
-                                                                                        "hive-interactive-site",
-                                                                                        set(['hive.llap.io.memory.size']),
-                                                                                        False)
-      if cache_size_per_node_in_changed_configs:
-        cache_size_per_node = self.get_cache_size_per_node_for_llap_nodes(services)
-        llap_io_enabled = 'false'
-        if cache_size_per_node >= 64:
-          llap_io_enabled = 'true'
-        putHiveInteractiveSiteProperty('hive.llap.io.enabled', llap_io_enabled)
-        Logger.info("Updated 'Hive Server interactive' config 'hive.llap.io.enabled' to '{0}'.".format(llap_io_enabled))
     else:
       putHiveInteractiveEnvProperty('enable_hive_interactive', 'false')
 
@@ -836,7 +822,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
         else:
           # If capacity-scheduler configs are received as a  dictionary (generally 1st time),
we deposit the changed
           # values back as dictionary itself.
-
           # Update existing configs in 'capacity-scheduler'.
           for prop, val in capacity_scheduler_properties.items():
             if llap_queue_name not in prop:
@@ -955,41 +940,62 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 
   """
   Checks and sets the 'Hive Server Interactive' 'hive.llap.daemon.queue.name' config Property
Attributes.  Takes into
-  account that 'capacity-scheduler' may have changed in current Stack Advisor invocation.
+  account that 'capacity-scheduler' may have changed (got updated) in current Stack Advisor
invocation.
   """
   def setLlapDaemonQueueNamePropAttributes(self, services, configurations):
-    Logger.info("Determing 'hive.llap.daemon.queue.name' config Property Attributes.")
+    Logger.info("Determining 'hive.llap.daemon.queue.name' config Property Attributes.")
     putHiveInteractiveSitePropertyAttribute = self.putPropertyAttribute(configurations, self.HIVE_INTERACTIVE_SITE)
     capacity_scheduler_properties = dict()
 
     # Read 'capacity-scheduler' from configurations if we modified and added recommendation
to it, as part of current
     # StackAdvisor invocation.
-    if 'capacity-scheduler' in configurations:
-      # Dictionary and having a length > 1, implies that we are dealing with 1st invocation,
else all configs for
-      # capacity-scheduler will come as "\n" separated single string.
-      if isinstance(configurations['capacity-scheduler']['properties'], dict) \
-        and len(configurations['capacity-scheduler']['properties']) > 1:
-        capacity_scheduler_properties = configurations['capacity-scheduler']['properties']
-        Logger.info("'capacity-scheduler' changed in current Stack Advisor invocation. Retrieved
the configs as dictionary from configurations.")
-      elif 'capacity-scheduler' in configurations['capacity-scheduler']['properties']:
-        properties = str(configurations['capacity-scheduler']['properties']['capacity-scheduler']).split('\n')
-        for property in properties:
-          key, sep, value = property.partition("=")
-          capacity_scheduler_properties[key] = value
-        Logger.info("'capacity-scheduler' changed in current Stack Advisor invocation. Retrieved
the configs as '\\n' "
-                    "separated single string from configurations.")
-    else: # read from input : services
+    if "capacity-scheduler" in configurations:
+        cap_sched_props_as_dict = configurations["capacity-scheduler"]["properties"]
+        if 'capacity-scheduler' in cap_sched_props_as_dict:
+          cap_sched_props_as_str = configurations['capacity-scheduler']['properties']['capacity-scheduler']
+          if cap_sched_props_as_str:
+            cap_sched_props_as_str = str(cap_sched_props_as_str).split('\n')
+            if len(cap_sched_props_as_str) > 0 and cap_sched_props_as_str[0] != 'null':
+              # Got 'capacity-scheduler' configs as one "\n" separated string
+              for property in cap_sched_props_as_str:
+                key, sep, value = property.partition("=")
+                capacity_scheduler_properties[key] = value
+              Logger.info("'capacity-scheduler' configs is set as a single '\\n' separated
string in current invocation. "
+                          "count(configurations['capacity-scheduler']['properties']['capacity-scheduler'])
= "
+                          "{0}".format(len(capacity_scheduler_properties)))
+            else:
+              Logger.info("Read configurations['capacity-scheduler']['properties']['capacity-scheduler']
is : {0}".format(cap_sched_props_as_str))
+          else:
+            Logger.info("configurations['capacity-scheduler']['properties']['capacity-scheduler']
: {0}.".format(cap_sched_props_as_str))
+
+        # if 'capacity_scheduler_properties' is empty, implies we may have 'capacity-scheduler'
configs as dictionary
+        # in configurations, if 'capacity-scheduler' changed in current invocation.
+        if not capacity_scheduler_properties:
+          if isinstance(cap_sched_props_as_dict, dict) and len(cap_sched_props_as_dict) >
1:
+            capacity_scheduler_properties = cap_sched_props_as_dict
+            Logger.info("'capacity-scheduler' changed in current Stack Advisor invocation.
Retrieved the configs as dictionary from configurations.")
+          else:
+            Logger.info("Read configurations['capacity-scheduler']['properties'] is : {0}".format(cap_sched_props_as_dict))
+    else:
+      Logger.info("'capacity-scheduler' not modified in the current Stack Advisor invocation.")
+
+
+    # if 'capacity_scheduler_properties' is still empty, implies 'capacity_scheduler' wasn't
change in current
+    # ST invocation. Thus, read it from input : 'services'.
+    if not capacity_scheduler_properties:
       capacity_scheduler_properties, received_as_key_value_pair = self.getCapacitySchedulerProperties(services)
       Logger.info("'capacity-scheduler' not changed in current Stack Advisor invocation.
Retrieved the configs from services.")
+
+    # Get set of current YARN leaf queues.
     leafQueueNames = self.getAllYarnLeafQueues(capacity_scheduler_properties)
     if leafQueueNames:
       leafQueues = [{"label": str(queueName), "value": queueName} for queueName in leafQueueNames]
-      leafQueues = sorted(leafQueues, key=lambda q:q['value'])
+      leafQueues = sorted(leafQueues, key=lambda q: q['value'])
       putHiveInteractiveSitePropertyAttribute("hive.llap.daemon.queue.name", "entries", leafQueues)
       Logger.info("'hive.llap.daemon.queue.name' config Property Attributes set to : {0}".format(leafQueues))
     else:
       Logger.error("Problem retrieving YARN queues. Skipping updating HIVE Server Interactve
"
-                   "'hive.server2.tez.default.queues' property.")
+                   "'hive.server2.tez.default.queues' property attributes.")
 
   """
   Gets all YARN leaf queues.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e22e2cbb/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index 0066e1d..1e4ddec 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -288,6 +288,32 @@ class TestHDP25StackAdvisor(TestCase):
       }
     }
 
+
+    # Expected 'hive_interactive_site' with 'hive.llap.daemon.queue.name' property_attributes
set to : 'a1', 'b' and llap.
+    self.expected_hive_interactive_site_prop_attr_as_a1_b_llap = {
+      "hive-interactive-site": {
+        "property_attributes": {
+          "hive.llap.daemon.queue.name": {
+            "entries": [
+              {
+                "value": "a1",
+                "label": "a1"
+              },
+              {
+                "value": "b",
+                "label": "b"
+              },
+              {
+                "value": "llap",
+                "label": "llap"
+              }
+            ]
+          }
+        }
+      }
+    }
+
+
     # Expected 'hive_interactive_site' with (1). 'hive.llap.daemon.queue.name' set to 'default'
queue, and
     # (2). 'hive.llap.daemon.queue.name' property_attributes set to : default.
     self.expected_hive_interactive_site_default = {
@@ -638,7 +664,7 @@ class TestHDP25StackAdvisor(TestCase):
   # Test 2 : (1). Only default queue exists in capacity-scheduler and capacity-scheduler
is passed-in as a dictionary,
   # and services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
is set to value "null"
   # (2). enable_hive_interactive' is 'On' and 'llap_queue_capacity is 0.
-  def test_recommendYARNConfigurations_create_llap_queue_1(self):
+  def test_recommendYARNConfigurations_create_llap_queue_2(self):
 
     services = {
       "services": [{
@@ -762,6 +788,7 @@ class TestHDP25StackAdvisor(TestCase):
     }
     self.stackAdvisor.recommendYARNConfigurations(configurations, self.clusterData, services,
self.hosts)
     # Check output
+
     self.assertEquals(configurations['hive-interactive-site']['properties']['hive.llap.daemon.queue.name'],
                       self.expected_hive_interactive_site_llap['hive-interactive-site']['properties']['hive.llap.daemon.queue.name'])
     self.assertEquals(configurations['hive-interactive-site']['property_attributes']['hive.llap.daemon.queue.name'],
@@ -777,7 +804,7 @@ class TestHDP25StackAdvisor(TestCase):
 
   # Test 3: (1). Only default queue exists in capacity-scheduler and 'capacity-scheduler'
configs are passed-in as
   # single "/n" separated string (2). enable_hive_interactive' is 'On' and 'llap_queue_capacity
is 40.
-  def test_recommendYARNConfigurations_create_llap_queue_2(self):
+  def test_recommendYARNConfigurations_create_llap_queue_3(self):
     services = {
       "services": [{
         "StackServices": {
@@ -916,7 +943,7 @@ class TestHDP25StackAdvisor(TestCase):
   # Test 4: (1). Only default queue exists in capacity-scheduler and capacity-scheduler is
passed-in as a dictionary
   # and services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
is null
   # (2). enable_hive_interactive' is 'On' and 'llap_queue_capacity is 40.
-  def test_recommendYARNConfigurations_create_llap_queue_2(self):
+  def test_recommendYARNConfigurations_create_llap_queue_4(self):
     services = {
       "services": [{
         "StackServices": {
@@ -4448,7 +4475,7 @@ class TestHDP25StackAdvisor(TestCase):
   #          'capacity-scheduler' configs are passed-in as single "/n" separated string 
and
   #          (2). configuration change detected for 'enable_hive_interactive'
   #         Expected : Configurations values recommended for llap related configs.
-  def test_recommendYARNConfigurations_five_node_manager_llap_configs_updated_3(self):
+  def test_recommendYARNConfigurations_five_node_manager_llap_configs_updated_4(self):
     # 3 node managers and yarn.nodemanager.resource.memory-mb": "204800"
     services = {
       "services": [{
@@ -4612,7 +4639,7 @@ class TestHDP25StackAdvisor(TestCase):
   #          services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
is set to value "null"  and
   #          (2). enable_hive_interactive' is 'on' and (3). configuration change detected
for 'hive.server2.tez.sessions.per.default.queue'
   #         Expected : Configurations values recommended for llap related configs.
-  def test_recommendYARNConfigurations_five_node_manager_llap_configs_updated_3(self):
+  def test_recommendYARNConfigurations_five_node_manager_llap_configs_updated_5(self):
     # 3 node managers and yarn.nodemanager.resource.memory-mb": "204800"
     services = {
       "services": [{
@@ -4768,9 +4795,324 @@ class TestHDP25StackAdvisor(TestCase):
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_size'],
'1024')
 
 
+  # Test 29: (1). only 'default' queue exists at root level in capacity-scheduler, and
+  #          'capacity-scheduler' configs are passed-in as single "/n" separated string 
and
+  #         Expected : 'hive.llap.daemon.queue.name' property attributes getting set with
current YARN leaf queues.
+  def test_recommendHIVEConfigurations_for_llap_queue_prop_attributes_1(self):
+    services = {
+      "services": [{
+        "StackServices": {
+          "service_name": "YARN",
+        },
+        "Versions": {
+          "stack_version": "2.5"
+        },
+        "components": [
+          {
+            "StackServiceComponents": {
+              "component_name": "NODEMANAGER",
+              "hostnames": ["c6401.ambari.apache.org"]
+            }
+          }
+        ]
+      }, {
+        "href": "/api/v1/stacks/HDP/versions/2.5/services/HIVE",
+        "StackServices": {
+          "service_name": "HIVE",
+          "service_version": "1.2.1.2.5",
+          "stack_name": "HDP",
+          "stack_version": "2.5"
+        },
+        "components": [
+          {
+            "href": "/api/v1/stacks/HDP/versions/2.5/services/HIVE/components/HIVE_SERVER_INTERACTIVE",
+            "StackServiceComponents": {
+              "advertise_version": "true",
+              "bulk_commands_display_name": "",
+              "bulk_commands_master_component_name": "",
+              "cardinality": "0-1",
+              "component_category": "MASTER",
+              "component_name": "HIVE_SERVER_INTERACTIVE",
+              "custom_commands": ["RESTART_LLAP"],
+              "decommission_allowed": "false",
+              "display_name": "HiveServer2 Interactive",
+              "has_bulk_commands_definition": "false",
+              "is_client": "false",
+              "is_master": "true",
+              "reassign_allowed": "false",
+              "recovery_enabled": "false",
+              "service_name": "HIVE",
+              "stack_name": "HDP",
+              "stack_version": "2.5",
+              "hostnames": ["c6401.ambari.apache.org"]
+            },
+            "dependencies": []
+          },
+          {
+            "StackServiceComponents": {
+              "advertise_version": "true",
+              "cardinality": "1+",
+              "component_category": "SLAVE",
+              "component_name": "NODEMANAGER",
+              "display_name": "NodeManager",
+              "is_client": "false",
+              "is_master": "false",
+              "hostnames": [
+                "c6401.ambari.apache.org"
+              ]
+            },
+            "dependencies": []
+          },
+        ]
+      }
+      ],
+      "changed-configurations": [
+        {
+          u'old_value': u'false',
+          u'type': u'hive-interactive-env',
+          u'name': u'enable_hive_interactive'
+        }
+      ],
+      "configurations": {
+        "capacity-scheduler": {
+          "properties": {
+            "capacity-scheduler": "yarn.scheduler.capacity.root.queues=default\n"
+                                  "yarn.scheduler.capacity.root.default.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.default.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.maximum-capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.capacity=100\n"
+                                  "yarn.scheduler.capacity.root.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.accessible-node-labels=*\n"
+                                  "yarn.scheduler.capacity.node-locality-delay=40\n"
+                                  "yarn.scheduler.capacity.maximum-applications=10000\n"
+                                  "yarn.scheduler.capacity.maximum-am-resource-percent=1\n"
+                                  "yarn.scheduler.capacity.queue-mappings-override.enable=false\n"
+          }
+        },
+        "hive-interactive-env":
+          {
+            'properties': {
+              'enable_hive_interactive': 'true',
+              'llap_queue_capacity':'50'
+            }
+          },
+        "hive-interactive-site":
+          {
+            'properties': {
+              'hive.llap.daemon.queue.name': 'llap',
+              'hive.server2.tez.sessions.per.default.queue': '1'
+            }
+          },
+        "hive-env":
+          {
+            'properties': {
+              'hive_user': 'hive'
+            }
+          },
+        "yarn-site": {
+          "properties": {
+            "yarn.scheduler.minimum-allocation-mb": "2048",
+            "yarn.nodemanager.resource.memory-mb": "204800",
+            "yarn.nodemanager.resource.cpu-vcores": '3'
+          }
+        },
+        "tez-interactive-site": {
+          "properties": {
+            "tez.am.resource.memory.mb": "1024"
+          }
+        },
+        "hive-site":
+          {
+            'properties': {
+              'hive.tez.container.size': '1024'
+            }
+          },
+      }
+    }
+
+
+    configurations = {
+    }
+
+    self.stackAdvisor.recommendHIVEConfigurations(configurations, self.clusterData, services,
self.hosts)
+    self.assertEquals(configurations['hive-interactive-site']['properties']['hive.llap.daemon.queue.name'],
+                      self.expected_hive_interactive_site_llap['hive-interactive-site']['properties']['hive.llap.daemon.queue.name'])
+
+
+
+
+
+
+  # Test 30: (1). More than 2 queues at leaf level exists in capacity-scheduler (one queue
is named 'llap') and
+  #         'capacity-scheduler' configs are passed-in as single "/n" separated string
+  #         Expected : 'hive.llap.daemon.queue.name' property attributes getting set with
current YARN leaf queues.
+  def test_recommendHIVEConfigurations_for_llap_queue_prop_attributes_2(self):
+    services= {
+      "services": [{
+        "StackServices": {
+          "service_name": "YARN",
+        },
+        "Versions": {
+          "stack_version": "2.5"
+        },
+        "components": [
+          {
+            "StackServiceComponents": {
+              "component_name": "NODEMANAGER",
+              "hostnames": ["c6401.ambari.apache.org"]
+            }
+          }
+        ]
+      }, {
+        "href": "/api/v1/stacks/HDP/versions/2.5/services/HIVE",
+        "StackServices": {
+          "service_name": "HIVE",
+          "service_version": "1.2.1.2.5",
+          "stack_name": "HDP",
+          "stack_version": "2.5"
+        },
+        "components": [
+          {
+            "href": "/api/v1/stacks/HDP/versions/2.5/services/HIVE/components/HIVE_SERVER_INTERACTIVE",
+            "StackServiceComponents": {
+              "advertise_version": "true",
+              "bulk_commands_display_name": "",
+              "bulk_commands_master_component_name": "",
+              "cardinality": "0-1",
+              "component_category": "MASTER",
+              "component_name": "HIVE_SERVER_INTERACTIVE",
+              "custom_commands": ["RESTART_LLAP"],
+              "decommission_allowed": "false",
+              "display_name": "HiveServer2 Interactive",
+              "has_bulk_commands_definition": "false",
+              "is_client": "false",
+              "is_master": "true",
+              "reassign_allowed": "false",
+              "recovery_enabled": "false",
+              "service_name": "HIVE",
+              "stack_name": "HDP",
+              "stack_version": "2.5",
+              "hostnames": ["c6401.ambari.apache.org"]
+            },
+            "dependencies": []
+          }
+        ]
+      }
+      ],
+      "changed-configurations": [
+        {
+          u'old_value': u'',
+          u'type': u'',
+          u'name': u''
+        }
+      ],
+      "configurations": {
+        "capacity-scheduler": {
+          "properties": {
+            "capacity-scheduler": "yarn.scheduler.capacity.maximum-am-resource-percent=0.2\n"
+                                  "yarn.scheduler.capacity.maximum-applications=10000\n"
+                                  "yarn.scheduler.capacity.node-locality-delay=40\n"
+                                  "yarn.scheduler.capacity.queue-mappings-override.enable=false\n"
+                                  "yarn.scheduler.capacity.resource-calculator=org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator\n"
+                                  "yarn.scheduler.capacity.root.accessible-node-labels=*\n"
+                                  "yarn.scheduler.capacity.root.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.capacity=75\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.maximum-capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.minimum-user-limit-percent=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.ordering-policy=fifo\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.a.a1.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.capacity=25\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.maximum-capacity=25\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.minimum-user-limit-percent=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.ordering-policy=fifo\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.a.llap.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.default.a.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.default.a.capacity=50\n"
+                                  "yarn.scheduler.capacity.root.default.a.maximum-capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.minimum-user-limit-percent=100\n"
+                                  "yarn.scheduler.capacity.root.default.a.ordering-policy=fifo\n"
+                                  "yarn.scheduler.capacity.root.default.a.queues=a1,llap\n"
+                                  "yarn.scheduler.capacity.root.default.a.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.a.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.default.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.default.b.acl_administer_queue=*\n"
+                                  "yarn.scheduler.capacity.root.default.b.acl_submit_applications=*\n"
+                                  "yarn.scheduler.capacity.root.default.b.capacity=50\n"
+                                  "yarn.scheduler.capacity.root.default.b.maximum-capacity=50\n"
+                                  "yarn.scheduler.capacity.root.default.b.minimum-user-limit-percent=100\n"
+                                  "yarn.scheduler.capacity.root.default.b.ordering-policy=fifo\n"
+                                  "yarn.scheduler.capacity.root.default.b.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.b.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.default.capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.maximum-capacity=100\n"
+                                  "yarn.scheduler.capacity.root.default.queues=a,b\n"
+                                  "yarn.scheduler.capacity.root.default.state=RUNNING\n"
+                                  "yarn.scheduler.capacity.root.default.user-limit-factor=1\n"
+                                  "yarn.scheduler.capacity.root.queues=default"
+          }
+        },
+        "hive-interactive-env":
+          {
+            'properties': {
+              'enable_hive_interactive': 'true',
+              'llap_queue_capacity':'0'
+            }
+          },
+        "hive-env":
+          {
+            'properties': {
+              'hive_user': 'hive'
+            }
+          },
+        "yarn-site": {
+          "properties": {
+            "yarn.scheduler.minimum-allocation-mb": "2048",
+            "yarn.nodemanager.resource.memory-mb": "204800",
+            "yarn.nodemanager.resource.cpu-vcores": '3'
+          }
+        },
+        "tez-interactive-site": {
+          "properties": {
+            "tez.am.resource.memory.mb": "1024",
+          }
+        },
+       "hive-site":
+        {
+          'properties': {
+            'hive.tez.container.size': '1024'
+          }
+        },
+        "hive-interactive-site":
+          {
+            'properties': {
+              'hive.llap.daemon.queue.name': 'llap',
+              'hive.server2.tez.sessions.per.default.queue': '1'
+            }
+          },
+      }
+    }
+
+
+    configurations = {
+    }
+    self.stackAdvisor.recommendHIVEConfigurations(configurations, self.clusterData, services,
self.hosts)
+    self.assertEquals(configurations['hive-interactive-site']['property_attributes']['hive.llap.daemon.queue.name'],
+                      self.expected_hive_interactive_site_prop_attr_as_a1_b_llap['hive-interactive-site']['property_attributes']['hive.llap.daemon.queue.name'])
+
+
 
 
-  def test_recommendAtlasConfigurations(self):
+def test_recommendAtlasConfigurations(self):
     self.maxDiff = None
     configurations = {
       "application-properties": {


Mime
View raw message