[fix](multicatalog) fix hadoop authenticator not inited for existing hms catalog. (#38930)

Backport #38475.

Co-authored-by: Yulei-Yang <yulei.yang0699@gmail.com>
This commit is contained in:
Qi Chen
2024-08-06 15:34:32 +08:00
committed by GitHub
parent 28c0510440
commit 5066be6df3

View File

@ -138,6 +138,11 @@ public class HMSExternalCatalog extends ExternalCatalog {
@Override
protected void initLocalObjectsImpl() {
if (authenticator == null) {
AuthenticationConfig config = AuthenticationConfig.getKerberosConfig(getConfiguration());
authenticator = HadoopAuthenticator.getHadoopAuthenticator(config);
}
HiveConf hiveConf = null;
JdbcClientConfig jdbcClientConfig = null;
String hiveMetastoreType = catalogProperty.getOrDefault(HMSProperties.HIVE_METASTORE_TYPE, "");