[fix](kerberos)enable hadoop auto renew tgt (#34439)

This commit is contained in:
slothever
2024-05-07 00:35:19 +08:00
committed by yiguolei
parent e19d57261c
commit 2d4da7d177
3 changed files with 14 additions and 8 deletions

View File

@ -29,6 +29,7 @@ import org.apache.doris.thrift.TTableType;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import java.io.DataInput;
import java.io.DataOutput;
@ -116,16 +117,16 @@ public class HiveTable extends Table {
}
// check auth type
String authType = copiedProps.get(AuthenticationConfig.HADOOP_SECURITY_AUTHENTICATION);
String authType = copiedProps.get(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION);
if (Strings.isNullOrEmpty(authType)) {
authType = AuthType.SIMPLE.getDesc();
}
if (!AuthType.isSupportedAuthType(authType)) {
throw new DdlException(String.format(PROPERTY_ERROR_MSG,
AuthenticationConfig.HADOOP_SECURITY_AUTHENTICATION, authType));
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION, authType));
}
copiedProps.remove(AuthenticationConfig.HADOOP_SECURITY_AUTHENTICATION);
hiveProperties.put(AuthenticationConfig.HADOOP_SECURITY_AUTHENTICATION, authType);
copiedProps.remove(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION);
hiveProperties.put(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION, authType);
if (AuthType.KERBEROS.getDesc().equals(authType)) {
// check principal