public class HadoopLoginUtil extends Object
UserGroupInformation#loginUserFromKeytab(String, String) changes the static fields of UserGroupInformation, especially the current logged-in user, and UserGroupInformation itself is not thread-safe. So it could introduce bugs if it is called multiple times in a JVM process. HadoopLoginUtil.loginHadoop guarantees at-most-once login in a JVM process. This should only be used on the daemon side.
|Constructor and Description
|Modifier and Type
|Method and Description
Login if a HDFS keytab/principal have been supplied; otherwise, assume it’s already logged in or running on insecure HDFS.
Login if a HDFS keytab/principal have been supplied; otherwise, assume it’s already logged in or running on insecure HDFS. This also guarantees that login only happens at most once.
conf - the daemon conf
Copyright © 2022 The Apache Software Foundation. All rights reserved.