ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [22/50] [abbrv] ambari git commit: ADDENDUM. AMBARI-19814. Backend path for 'num_llap_nodes' should show up as non-editable property when non-ambari managed queue is selected.
Date Fri, 03 Feb 2017 14:53:26 GMT
ADDENDUM. AMBARI-19814. Backend path for 'num_llap_nodes' should show up as non-editable property
when non-ambari managed queue is selected.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e406234a7dcc1f11f9f13c8e40fd64187e20eaf8
Parents: c10fcc8
Author: Swapan Shridhar <sshridhar@hortonworks.com>
Authored: Wed Feb 1 17:08:41 2017 -0800
Committer: Swapan Shridhar <sshridhar@hortonworks.com>
Committed: Wed Feb 1 17:08:41 2017 -0800

----------------------------------------------------------------------
 .../stacks/HDP/2.5/services/stack_advisor.py    | 12 ++++-----
 .../stacks/2.5/common/test_stack_advisor.py     | 28 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e406234a/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 bf86cd5..aa47493 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
@@ -710,9 +710,9 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
             putHiveInteractiveSiteProperty("hive.server2.tez.default.queues", hive_tez_default_queue)
             Logger.debug("Updated 'hive.server2.tez.default.queues' config : '{0}'".format(hive_tez_default_queue))
     else:
-      Logger.info("DBG: Setting visibility for num_llap_nodes to false")
+      Logger.info("DBG: Setting 'num_llap_nodes' config's  READ ONLY attribute as 'True'.")
       putHiveInteractiveEnvProperty('enable_hive_interactive', 'false')
-      putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "visible", "false")
+      putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "read_only", "true")
 
     if hsi_properties and "hive.llap.zk.sm.connectionString" in hsi_properties:
       zookeeper_host_port = self.getZKHostPortString(services)
@@ -831,14 +831,14 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
       if (len(leafQueueNames) == 2 and (llap_daemon_selected_queue_name and llap_daemon_selected_queue_name
== llap_queue_name) or
         llap_named_queue_selected_in_curr_invocation) or \
         (len(leafQueueNames) == 1 and llap_daemon_selected_queue_name == 'default' and llap_named_queue_selected_in_curr_invocation):
-          Logger.info("Setting visibility of num_llap_nodes to true.")
-          putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "visible", "true")
+          Logger.info("DBG: Setting 'num_llap_nodes' config's  READ ONLY attribute as 'False'.")
+          putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "read_only", "false")
           selected_queue_is_ambari_managed_llap = True
           Logger.info("DBG: Selected YARN queue for LLAP is : '{0}'. Current YARN queues
: {1}. Setting 'Number of LLAP nodes' "
                         "slider visibility to 'True'".format(llap_queue_name, list(leafQueueNames)))
       else:
-        Logger.info("Setting visibility of num_llap_nodes to false.")
-        putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "visible", "false")
+        Logger.info("DBG: Setting 'num_llap_nodes' config's  READ ONLY attribute as 'True'.")
+        putHiveInteractiveEnvPropertyAttribute("num_llap_nodes", "read_only", "true")
         Logger.info("Selected YARN queue for LLAP is : '{0}'. Current YARN queues : {1}.
Setting 'Number of LLAP nodes' "
                      "visibility to 'False'.".format(llap_daemon_selected_queue_name, list(leafQueueNames)))
         selected_queue_is_ambari_managed_llap = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/e406234a/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 fe58217..9029dbb 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
@@ -1182,7 +1182,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'819')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'visible': 'true', 'minimum': '1', 'maximum': '1'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'read_only': 'false', 'minimum': '1', 'maximum': '1'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'512')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -1379,7 +1379,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'819')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'visible': 'false', 'minimum': '1', 'maximum': '1'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'read_only': 'true', 'minimum': '1', 'maximum': '1'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'341')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.auto.convert.join.noconditionaltask.size'],
'286261248')
@@ -1572,7 +1572,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'1638')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'visible': 'true', 'minimum': '1', 'maximum': '1'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'read_only': 'false', 'minimum': '1', 'maximum': '1'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'1024')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -1773,7 +1773,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'6553')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'2048')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -1971,7 +1971,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'341')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -2167,7 +2167,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '3', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'2048')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -2370,7 +2370,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'6553')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'3072')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -2567,7 +2567,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'16384')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'341')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -2760,7 +2760,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'visible': 'true'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'read_only': 'false'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'2048')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
@@ -2951,7 +2951,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'visible': 'false'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'read_only': 'true'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'2048')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.auto.convert.join.noconditionaltask.size'],
'572522496')
@@ -3173,7 +3173,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'visible': 'false'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '5', 'minimum': '1', 'read_only': 'true'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'512')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.auto.convert.join.noconditionaltask.size'],
'572522496')
@@ -3396,7 +3396,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'1024')
     self.assertEquals(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
-                      {'maximum': '5', 'minimum': '1', 'visible': 'false'})
+                      {'maximum': '5', 'minimum': '1', 'read_only': 'true'})
 
     self.assertTrue('tez.am.resource.memory.mb' not in configurations['tez-interactive-site']['properties'])
 
@@ -3580,7 +3580,7 @@ class TestHDP25StackAdvisor(TestCase):
                       self.expected_hive_interactive_site_llap['hive-interactive-site']['properties']['hive.llap.daemon.queue.name'])
     self.assertEquals(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'llap')
     self.assertEquals(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
-                      {'maximum': '1', 'minimum': '1', 'visible': 'true'})
+                      {'maximum': '1', 'minimum': '1', 'read_only': 'false'})
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.llap.io.threadpool.size'],
'0')
 
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.llap.io.memory.size'],
'0')
@@ -3773,7 +3773,7 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'],
'4915')
     self.assertEqual(configurations['hive-interactive-env']['properties']['hive_heapsize'],
'2048')
-    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '1', 'minimum': '1', 'visible': 'false'})
+    self.assertEqual(configurations['hive-interactive-env']['property_attributes']['num_llap_nodes'],
{'maximum': '1', 'minimum': '1', 'read_only': 'true'})
 
     self.assertEqual(configurations['hive-interactive-env']['properties']['slider_am_container_mb'],
'2048')
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.server2.tez.default.queues'],
'default')


Mime
View raw message