Преглед на файлове

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

Srimanth Gunturi преди 10 години
родител
ревизия
25ee93a677
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py

+ 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:
         prop_name = 'hive.security.authorization.manager'
         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,
                                   "item": self.getWarnItem(
                                   "If Ranger Hive Plugin is disabled."\
                                   " {0} needs to be set to {1}".format(prop_name,prop_val))})
         prop_name = 'hive.security.authenticator.manager'
         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,
                                   "item": self.getWarnItem(
                                   "If Ranger Hive Plugin is disabled."\