Browse Source

AMBARI-11982 Error occured in stack advisor while creating cluster - hive.security.authorization.manager - HDP2.3 fix (srimanth)

Srimanth Gunturi 10 years ago
parent
commit
25ee93a677

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py

@@ -258,14 +258,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
       elif not ranger_plugin_enabled:
       elif not ranger_plugin_enabled:
         prop_name = 'hive.security.authorization.manager'
         prop_name = 'hive.security.authorization.manager'
         prop_val = "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory"
         prop_val = "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory"
-        if hive_server2[prop_name] != prop_val:
+        if prop_name in hive_server2 and hive_server2[prop_name] != prop_val:
           validationItems.append({"config-name": prop_name,
           validationItems.append({"config-name": prop_name,
                                   "item": self.getWarnItem(
                                   "item": self.getWarnItem(
                                   "If Ranger Hive Plugin is disabled."\
                                   "If Ranger Hive Plugin is disabled."\
                                   " {0} needs to be set to {1}".format(prop_name,prop_val))})
                                   " {0} needs to be set to {1}".format(prop_name,prop_val))})
         prop_name = 'hive.security.authenticator.manager'
         prop_name = 'hive.security.authenticator.manager'
         prop_val = "org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator"
         prop_val = "org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator"
-        if hive_server2[prop_name] != prop_val:
+        if prop_name in hive_server2 and hive_server2[prop_name] != prop_val:
           validationItems.append({"config-name": prop_name,
           validationItems.append({"config-name": prop_name,
                                   "item": self.getWarnItem(
                                   "item": self.getWarnItem(
                                   "If Ranger Hive Plugin is disabled."\
                                   "If Ranger Hive Plugin is disabled."\