Package org.apache.hadoop.hbase.util
Class KerberosUtils
java.lang.Object
org.apache.hadoop.hbase.util.KerberosUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.security.UserGroupInformation
loginAndReturnUGI
(org.apache.hadoop.conf.Configuration conf, String username) Logs in a user using Kerberos keytab and returns the UserGroupInformation (UGI) instance.
-
Field Details
-
LOG
-
-
Constructor Details
-
KerberosUtils
public KerberosUtils()
-
-
Method Details
-
loginAndReturnUGI
public static org.apache.hadoop.security.UserGroupInformation loginAndReturnUGI(org.apache.hadoop.conf.Configuration conf, String username) throws IOException Logs in a user using Kerberos keytab and returns the UserGroupInformation (UGI) instance.- Parameters:
conf
- the configuration objectusername
- the username for which the keytab file and principal are configured.- Returns:
- the UserGroupInformation instance for the logged-in user.
- Throws:
IOException
- If an I/O error occurs during login.
-