Browse Source

[hbase] Tell user when HBase kerberos principal is missing from hbase-site.xml in secure mode

krish 11 năm trước cách đây
mục cha
commit
6edcd4f
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      apps/hbase/src/hbase/api.py

+ 3 - 0
apps/hbase/src/hbase/api.py

@@ -103,6 +103,9 @@ class HbaseApi(object):
       kerberos_principal_short_name = None
     use_sasl = get_server_authentication() == 'KERBEROS'
 
+    if use_sasl and kerberos_principal_short_name is None:
+      raise PopupException(_("The kerberos principal name is missing from the hbase-site.xml configuration file."))
+
     return {
         'kerberos_principal_short_name': kerberos_principal_short_name,
         'use_sasl': use_sasl,