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(advisor changes)
Date Fri, 03 Jul 2015 09:54:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b7b518a9c -> 957bf2b8c


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


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

Branch: refs/heads/trunk
Commit: 957bf2b8cf5234f9f2c42a6f928a6fedb6e88534
Parents: b7b518a
Author: Artem Baranchuk <abaranchuk@hortonworks.con>
Authored: Fri Jul 3 03:14:16 2015 +0300
Committer: Artem Baranchuk <abaranchuk@hortonworks.con>
Committed: Fri Jul 3 12:54:08 2015 +0300

----------------------------------------------------------------------
 .../server/upgrade/UpgradeCatalog210.java       |  1 -
 .../stacks/HDP/2.2/services/stack_advisor.py    | 32 +++++++++++++++-----
 2 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/957bf2b8/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index b0480fa..47ddd7a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -1440,7 +1440,6 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
                 hbaseSiteRemoveProps.add("hbase.bucketcache.ioengine");
                 hbaseSiteRemoveProps.add("hbase.bucketcache.size");
                 hbaseSiteRemoveProps.add("hbase.bucketcache.percentage.in.combinedcache");
-                hbaseSiteRemoveProps.add("hbase_max_direct_memory_size");
                 hbaseEnvRemoveProps.add("hbase_max_direct_memory_size");
               }
             }

http://git-wip-us.apache.org/repos/asf/ambari/blob/957bf2b8/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 a085ab2..477f724 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
@@ -477,8 +477,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       putHbaseSiteProperty("phoenix.functions.allowUserDefinedFunctions", 'true')
     else:
       putHbaseSiteProperty("hbase.regionserver.wal.codec", 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec')
-      putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true')
-      putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete',
'true')
+      if ('hbase.rpc.controllerfactory.class' in configurations["hbase-site"]["properties"])
or \
+              ('hbase-site' in services['configurations'] and 'hbase.rpc.controllerfactory.class'
in services['configurations']["hbase-site"]["properties"]):
+        putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true')
+      if ('phoenix.functions.allowUserDefinedFunctions' in configurations["hbase-site"]["properties"])
or \
+              ('hbase-site' in services['configurations'] and 'phoenix.functions.allowUserDefinedFunctions'
in services['configurations']["hbase-site"]["properties"]):
+        putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete',
'true')
 
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
     if 'ranger-hbase-plugin-properties' in services['configurations'] and ('ranger-hbase-plugin-enabled'
in services['configurations']['ranger-hbase-plugin-properties']['properties']):
@@ -518,10 +522,18 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       putHbaseEnvProperty('hbase_regionserver_heapsize', regionserver_heap_size)
     else:
       # Disable
-      putHbaseSitePropertyAttributes('hbase.bucketcache.ioengine', 'delete', 'true')
-      putHbaseSitePropertyAttributes('hbase.bucketcache.size', 'delete', 'true')
-      putHbaseSitePropertyAttributes('hbase.bucketcache.percentage.in.combinedcache', 'delete',
'true')
-      putHbaseEnvPropertyAttributes('hbase_max_direct_memory_size', 'delete', 'true')
+      if ('hbase.bucketcache.ioengine' in configurations["hbase-site"]["properties"]) or
\
+              ('hbase-site' in services['configurations'] and 'hbase.bucketcache.ioengine'
in services['configurations']["hbase-site"]["properties"]):
+        putHbaseSitePropertyAttributes('hbase.bucketcache.ioengine', 'delete', 'true')
+      if ('hbase.bucketcache.size' in configurations["hbase-site"]["properties"]) or \
+              ('hbase-site' in services['configurations'] and 'hbase.bucketcache.size' in
services['configurations']["hbase-site"]["properties"]):
+        putHbaseSitePropertyAttributes('hbase.bucketcache.size', 'delete', 'true')
+      if ('hbase.bucketcache.percentage.in.combinedcache' in configurations["hbase-site"]["properties"])
or \
+              ('hbase-site' in services['configurations'] and 'hbase.bucketcache.percentage.in.combinedcache'
in services['configurations']["hbase-site"]["properties"]):
+        putHbaseSitePropertyAttributes('hbase.bucketcache.percentage.in.combinedcache', 'delete',
'true')
+      if ('hbase_max_direct_memory_size' in configurations["hbase-env"]["properties"]) or
\
+              ('hbase-env' in services['configurations'] and 'hbase_max_direct_memory_size'
in services['configurations']["hbase-env"]["properties"]):
+        putHbaseEnvPropertyAttributes('hbase_max_direct_memory_size', 'delete', 'true')
 
     # Authorization
     hbase_coprocessor_region_classes = None
@@ -548,10 +560,14 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       else:
         putHbaseSiteProperty('hbase.coprocessor.master.classes', "")
         coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint")
-        putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
+        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"]):
+          putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
     else:
       coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint")
-      putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
+      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"]):
+        putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete',
'true')
 
     # Authentication
     if 'hbase-site' in services['configurations'] and 'hbase.security.authentication' in
services['configurations']['hbase-site']['properties']:


Mime
View raw message