ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-13649. Stack advisor throwing errors for hbase-site while visiting any service config page. (jaimin)
Date Fri, 30 Oct 2015 16:55:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a1c87c9d4 -> 4caf23df4


AMBARI-13649. Stack advisor throwing errors for hbase-site while visiting any service config
page. (jaimin)


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

Branch: refs/heads/branch-2.1
Commit: 4caf23df4dfff294a0224889eab5f734f7a0724c
Parents: a1c87c9
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Oct 30 09:54:40 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Oct 30 09:54:52 2015 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/stack_advisor.py    | 41 ++++++++++----------
 1 file changed, 21 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4caf23df/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 c813556..06519ac 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
@@ -698,27 +698,28 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
     hbaseClassConfigs = ['hbase.coprocessor.master.classes', 'hbase.coprocessor.region.classes']
 
     for item in range(len(hbaseClassConfigs)):
-      if hbaseClassConfigs[item] in services['configurations']['hbase-site']['properties']:
-        if 'hbase-site' in configurations and hbaseClassConfigs[item] in configurations['hbase-site']['properties']:
-          coprocessorConfig = configurations['hbase-site']['properties'][hbaseClassConfigs[item]]
-        else:
-          coprocessorConfig = services['configurations']['hbase-site']['properties'][hbaseClassConfigs[item]]
-        coprocessorClasses = coprocessorConfig.split(",")
-        coprocessorClasses = filter(None, coprocessorClasses) # Removes empty string elements
from array
-        if rangerPluginEnabled and rangerPluginEnabled.lower() == 'Yes'.lower():
-          if nonRangerClass in coprocessorClasses:
-            coprocessorClasses.remove(nonRangerClass)
-          if not rangerClass in coprocessorClasses:
-            coprocessorClasses.append(rangerClass)
-          putHbaseSiteProperty(hbaseClassConfigs[item], ','.join(coprocessorClasses))
-        elif rangerPluginEnabled and rangerPluginEnabled.lower() == 'No'.lower():
-          if rangerClass in coprocessorClasses:
-            coprocessorClasses.remove(rangerClass)
-            if not nonRangerClass in coprocessorClasses:
-              coprocessorClasses.append(nonRangerClass)
+      if 'hbase-site' in services['configurations']:
+        if hbaseClassConfigs[item] in services['configurations']['hbase-site']['properties']:
+          if 'hbase-site' in configurations and hbaseClassConfigs[item] in configurations['hbase-site']['properties']:
+            coprocessorConfig = configurations['hbase-site']['properties'][hbaseClassConfigs[item]]
+          else:
+            coprocessorConfig = services['configurations']['hbase-site']['properties'][hbaseClassConfigs[item]]
+          coprocessorClasses = coprocessorConfig.split(",")
+          coprocessorClasses = filter(None, coprocessorClasses) # Removes empty string elements
from array
+          if rangerPluginEnabled and rangerPluginEnabled.lower() == 'Yes'.lower():
+            if nonRangerClass in coprocessorClasses:
+              coprocessorClasses.remove(nonRangerClass)
+            if not rangerClass in coprocessorClasses:
+              coprocessorClasses.append(rangerClass)
             putHbaseSiteProperty(hbaseClassConfigs[item], ','.join(coprocessorClasses))
-      elif rangerPluginEnabled and rangerPluginEnabled.lower() == 'Yes'.lower():
-        putHbaseSiteProperty(hbaseClassConfigs[item], rangerClass)
+          elif rangerPluginEnabled and rangerPluginEnabled.lower() == 'No'.lower():
+            if rangerClass in coprocessorClasses:
+              coprocessorClasses.remove(rangerClass)
+              if not nonRangerClass in coprocessorClasses:
+                coprocessorClasses.append(nonRangerClass)
+              putHbaseSiteProperty(hbaseClassConfigs[item], ','.join(coprocessorClasses))
+        elif rangerPluginEnabled and rangerPluginEnabled.lower() == 'Yes'.lower():
+          putHbaseSiteProperty(hbaseClassConfigs[item], rangerClass)
 
 
   def recommendTezConfigurations(self, configurations, clusterData, services, hosts):


Mime
View raw message