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 43c19fb1a3f405..342f86b71259e6 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 @@ -73,6 +73,7 @@ private static UserGroupInformation loginWithUGI(AuthenticationConfig config) { String hadoopUserName = ((SimpleAuthenticationConfig) config).getUsername(); if (hadoopUserName == null) { hadoopUserName = "hadoop"; + ((SimpleAuthenticationConfig) config).setUsername(hadoopUserName); LOG.debug(AuthenticationConfig.HADOOP_USER_NAME + " is unset, use default user: hadoop"); } ugi = UserGroupInformation.createRemoteUser(hadoopUserName); diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/SimpleAuthenticationConfig.java b/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/SimpleAuthenticationConfig.java index 57bb7887372609..d202417afc8e33 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/SimpleAuthenticationConfig.java +++ b/fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/SimpleAuthenticationConfig.java @@ -18,7 +18,6 @@ package org.apache.doris.common.security.authentication; import lombok.Data; -import org.apache.commons.lang3.StringUtils; @Data public class SimpleAuthenticationConfig extends AuthenticationConfig { @@ -26,6 +25,6 @@ public class SimpleAuthenticationConfig extends AuthenticationConfig { @Override public boolean isValid() { - return StringUtils.isNotEmpty(username); + return true; } }