Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5395] improvment(hive-catalog,iceberg): Set configuration hive.metastore.sasl.enabled automatically when kerberos is enabled. #5396

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ void testIcebergWithKerberosAndUserImpersonation() throws IOException {
CATALOG_BYPASS_PREFIX + "hive.metastore.kerberos.principal",
"hive/_HOST@HADOOPKRB"
.replace("_HOST", containerSuite.getKerberosHiveContainer().getHostName()));
properties.put(CATALOG_BYPASS_PREFIX + "hive.metastore.sasl.enabled", "true");

properties.put(IcebergConfig.CATALOG_BACKEND.getKey(), TYPE);
properties.put(IcebergConfig.CATALOG_URI.getKey(), URIS);
properties.put(IcebergConfig.CATALOG_WAREHOUSE.getKey(), WAREHOUSE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION;
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION;
import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
Expand Down Expand Up @@ -78,6 +79,7 @@ private static HiveCatalog loadHiveCatalog(IcebergConfig icebergConfig) {
resultProperties.put(CatalogProperties.CLIENT_POOL_CACHE_KEYS, "USER_NAME");
hdfsConfiguration.set(HADOOP_SECURITY_AUTHORIZATION, "true");
hdfsConfiguration.set(HADOOP_SECURITY_AUTHENTICATION, "kerberos");
hdfsConfiguration.set(METASTORE_USE_THRIFT_SASL.varname, "true");
hiveCatalog.setConf(hdfsConfiguration);
hiveCatalog.initialize(icebergCatalogName, properties);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ Map<String, String> getCatalogConfig() {
configMap.put(
"gravitino.iceberg-rest.authentication.kerberos.keytab-uri",
tempDir + HIVE_METASTORE_CLIENT_KEYTAB);
configMap.put("gravitino.iceberg-rest.hive.metastore.sasl.enabled", "true");
configMap.put(
"gravitino.iceberg-rest.hive.metastore.kerberos.principal",
"hive/_HOST@HADOOPKRB"
Expand Down
Loading