File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
fe/fe-common/src/main/java/org/apache/doris/common/security/authentication Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,16 @@ private static UserGroupInformation loginWithUGI(AuthenticationConfig config) {
76
76
((SimpleAuthenticationConfig ) config ).setUsername (hadoopUserName );
77
77
LOG .debug (AuthenticationConfig .HADOOP_USER_NAME + " is unset, use default user: hadoop" );
78
78
}
79
+
80
+ try {
81
+ ugi = UserGroupInformation .getLoginUser ();
82
+ if (ugi .getUserName ().equals (hadoopUserName )) {
83
+ return ugi ;
84
+ }
85
+ } catch (IOException e ) {
86
+ LOG .warn ("A SecurityException occurs with simple, do login immediately." , e );
87
+ }
88
+
79
89
ugi = UserGroupInformation .createRemoteUser (hadoopUserName );
80
90
UserGroupInformation .setLoginUser (ugi );
81
91
LOG .debug ("Login by proxy user, hadoop.username: {}" , hadoopUserName );
You can’t perform that action at this time.
0 commit comments