File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
fe/fe-core/src/main/java/org/apache/doris/fs/remote/dfs Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,16 @@ private UserGroupInformation doLogin(Configuration conf) throws UserException {
146
146
hadoopUserName = "hadoop" ;
147
147
LOG .debug (HdfsResource .HADOOP_USER_NAME + " is unset, use default user: hadoop" );
148
148
}
149
+
150
+ try {
151
+ UserGroupInformation ugi = UserGroupInformation .getLoginUser ();
152
+ if (ugi .getUserName ().equals (hadoopUserName )) {
153
+ return ugi ;
154
+ }
155
+ } catch (IOException e ) {
156
+ LOG .warn ("A SecurityException occurs with simple, do login immediately." , e );
157
+ }
158
+
149
159
UserGroupInformation ugi = UserGroupInformation .createRemoteUser (hadoopUserName );
150
160
UserGroupInformation .setLoginUser (ugi );
151
161
LOG .info ("Login by proxy user, hadoop.username: {}" , hadoopUserName );
You can’t perform that action at this time.
0 commit comments