def get_hiveserver2_kerberos_principal(hostname_or_ip):
 fqdn = security_util.get_fqdn(hostname_or_ip)
 principal = get_conf().get(_CNF_HIVESERVER2_KERBEROS_PRINCIPAL, None)
 if principal:
  return security_util.get_kerberos_principal(principal, fqdn)
 else:
  return None

def get_hiveserver2_kerberos_principal ( hostname_or_ip ) : fqdn = security_util . get_fqdn ( hostname_or_ip ) principal = get_conf ( ) . get ( _CNF_HIVESERVER2_KERBEROS_PRINCIPAL , None ) if principal : return security_util . get_kerberos_principal ( principal , fqdn ) else : return None
retrieves principal for hiveserver 2 .