This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new b3eaf0e4d2f [bugfix](hive)Prevent multiple fs from being generated for
2.1 (#37142)
b3eaf0e4d2f is described below
commit b3eaf0e4d2fcc2b6b5a7a05c3095fab6f9086964
Author: wuwenchi <[email protected]>
AuthorDate: Tue Jul 2 22:54:40 2024 +0800
[bugfix](hive)Prevent multiple fs from being generated for 2.1 (#37142)
pick #36954
---
.../apache/doris/common/security/authentication/HadoopUGI.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/HadoopUGI.java
b/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/HadoopUGI.java
index 342f86b7125..db8b9093b07 100644
---
a/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/HadoopUGI.java
+++
b/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/HadoopUGI.java
@@ -76,6 +76,16 @@ public class HadoopUGI {
((SimpleAuthenticationConfig)
config).setUsername(hadoopUserName);
LOG.debug(AuthenticationConfig.HADOOP_USER_NAME + " is unset,
use default user: hadoop");
}
+
+ try {
+ ugi = UserGroupInformation.getLoginUser();
+ if (ugi.getUserName().equals(hadoopUserName)) {
+ return ugi;
+ }
+ } catch (IOException e) {
+ LOG.warn("A SecurityException occurs with simple, do login
immediately.", e);
+ }
+
ugi = UserGroupInformation.createRemoteUser(hadoopUserName);
UserGroupInformation.setLoginUser(ugi);
LOG.debug("Login by proxy user, hadoop.username: {}",
hadoopUserName);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]