ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abaranc...@apache.org
Subject ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests)
Date Fri, 03 Jul 2015 12:47:02 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 1d179bc35 -> ad0b13806


AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests)


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

Branch: refs/heads/branch-2.1
Commit: ad0b1380604acca5eff3844edcd276e8af73190a
Parents: 1d179bc
Author: Artem Baranchuk <abaranchuk@hortonworks.con>
Authored: Fri Jul 3 15:46:29 2015 +0300
Committer: Artem Baranchuk <abaranchuk@hortonworks.con>
Committed: Fri Jul 3 15:46:29 2015 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/stack_advisor.py    |  8 +--
 .../stacks/2.2/common/test_stack_advisor.py     | 17 +++---
 .../stacks/2.3/common/test_stack_advisor.py     | 57 ++++++++++----------
 3 files changed, 43 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0b1380/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 477f724..f238d44 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -560,13 +560,13 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       else:
         putHbaseSiteProperty('hbase.coprocessor.master.classes', "")
         coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint")
-        if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"])
or \
-                ('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes'
in services['configurations']["hbase-env"]["properties"]):
+        if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"])
or \
+                ('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes'
in services['configurations']["hbase-site"]["properties"]):
           putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
     else:
       coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint")
-      if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"])
or \
-              ('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes'
in services['configurations']["hbase-env"]["properties"]):
+      if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"])
or \
+              ('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes'
in services['configurations']["hbase-site"]["properties"]):
         putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
 
     # Authentication

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0b1380/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 7726b16..f26c08f 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -1907,11 +1907,19 @@ class TestHDP22StackAdvisor(TestCase):
       "configurations": {
         "hbase-env": {
           "properties": {
-            "phoenix_sql_enabled": "true"
+            "phoenix_sql_enabled": "true",
+            "hbase_max_direct_memory_size": ""
           }
         },
         "hbase-site": {
-          "properties": {}
+          "properties": {
+            "hbase.rpc.controllerfactory.class": "",
+            "phoenix.functions.allowUserDefinedFunctions": "",
+            "hbase.bucketcache.ioengine": "",
+            "hbase.bucketcache.size": "",
+            "hbase.bucketcache.percentage.in.combinedcache": "",
+            "hbase.coprocessor.regionserver.classes": ""
+          }
         }
       }
     }
@@ -1924,9 +1932,6 @@ class TestHDP22StackAdvisor(TestCase):
           "hbase.coprocessor.region.classes": "org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint"
         },
         'property_attributes': {
-          'hbase.coprocessor.regionserver.classes': {
-            'delete': 'true'
-          },
           "hbase.bucketcache.size": {
             "delete": "true"
           },
@@ -2037,7 +2042,7 @@ class TestHDP22StackAdvisor(TestCase):
     self.assertEquals(configurations, expected)
 
     # Test - default recommendations should have certain configs deleted. HAS TO BE LAST
TEST.
-    services["configurations"] = {}
+    services["configurations"] = {"hbase-site": {"properties": {"phoenix.functions.allowUserDefinedFunctions":
'', "hbase.rpc.controllerfactory.class": ''}}}
     configurations = {}
     self.stackAdvisor.recommendHBASEConfigurations(configurations, clusterData, services,
None)
     self.assertEquals(configurations['hbase-site']['property_attributes']['phoenix.functions.allowUserDefinedFunctions'],
{'delete': 'true'})

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0b1380/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 dedadeb..4570c99 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
@@ -72,19 +72,7 @@ class TestHDP23StackAdvisor(TestCase):
     return self.get_system_min_uid_real()
 
   def test_recommendHBASEConfigurations(self):
-    configurations = {
-        "yarn-site": {
-            "properties": {
-                "yarn.scheduler.minimum-allocation-mb": "256",
-                "yarn.scheduler.maximum-allocation-mb": "2048",
-                },
-            },
-        "hbase-env": {
-          "properties": {
-            "phoenix_sql_enabled" : "true"
-          },
-        }
-    }
+    configurations = {}
     clusterData = {
       "totalAvailableRam": 2048,
       "hBaseInstalled": True,
@@ -118,22 +106,16 @@ class TestHDP23StackAdvisor(TestCase):
         "properties": {
           "hbase_master_heapsize": "114688",
           "hbase_max_direct_memory_size": "94208",
-          "hbase_regionserver_heapsize": "20480",
-          "phoenix_sql_enabled" : "true"
-        }
-      },
-      "yarn-site": {
-        "properties": {
-          "yarn.scheduler.minimum-allocation-mb": "256",
-          "yarn.scheduler.maximum-allocation-mb": "2048"
+          "hbase_regionserver_heapsize": "20480"
         }
       }
     }
-    services = {"services":
+    services = {
+      "services":
         [{"StackServices":
-              {"service_name" : "HDFS",
-               "service_version" : "2.6.0.2.2"
-               },
+            {"service_name" : "HDFS",
+             "service_version" : "2.6.0.2.2"
+             },
           "components":[
             {
               "href":"/api/v1/stacks/HDP/versions/2.2/services/HDFS/components/DATANODE",
@@ -217,9 +199,26 @@ class TestHDP23StackAdvisor(TestCase):
 
               ]
             },
-          ],
-        }],
-    "configurations": configurations
+            ],
+          }],
+      "configurations": {
+        "yarn-site": {
+          "properties": {
+            "yarn.scheduler.minimum-allocation-mb": "256",
+            "yarn.scheduler.maximum-allocation-mb": "2048"
+            }
+          },
+        "hbase-env": {
+          "properties": {
+            "phoenix_sql_enabled": "true"
+          }
+        },
+        "hbase-site": {
+          "properties": {
+            "hbase.coprocessor.regionserver.classes": ""
+          }
+        }
+      }
     }
 
     # Test
@@ -238,7 +237,7 @@ class TestHDP23StackAdvisor(TestCase):
     self.assertEquals(configurations, expected)
 
     # Test - default recommendations should have certain configs deleted. HAS TO BE LAST
TEST.
-    services["configurations"] = {}
+    services["configurations"] = {"hbase-site": {"properties": {"phoenix.functions.allowUserDefinedFunctions":
'', "hbase.rpc.controllerfactory.class": '', "hbase.region.server.rpc.scheduler.factory.class":
''}}}
     configurations = {}
     self.stackAdvisor.recommendHBASEConfigurations(configurations, clusterData, services,
None)
     self.assertEquals(configurations['hbase-site']['property_attributes']['phoenix.functions.allowUserDefinedFunctions'],
{'delete': 'true'})


Mime
View raw message