lasdf1234 commented on code in PR #11901:
URL: https://github.com/apache/gravitino/pull/11901#discussion_r3540670849
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ClosableHiveCatalog.java:
##########
@@ -281,10 +287,7 @@ private KerberosClient initKerberosClient() {
.loginMode(KerberosAuthUtils.LoginMode.CURRENT_USER)
.checkIntervalSec(kerberosConfig.getCheckIntervalSec())
.build();
- // catalog_uuid always exists for Gravitino managed catalogs, `0` is
just a fallback value.
- String catalogUUID = properties().getOrDefault("catalog_uuid", "0");
- File keytabFile =
- new File(String.format(KerberosConfig.GRAVITINO_KEYTAB_FORMAT,
catalogUUID));
+ File keytabFile = new
File(String.format(KerberosConfig.GRAVITINO_KEYTAB_FORMAT, name()));
Review Comment:
This is an intentional modification.
Originally, the keytab cache path used to be "catalog_uuid". In standalone
IRC, this property is usually not present and it would fallback to "0".
Multiple Kerberos catalogs share the keytab
"keytab/gravitino-lakehouse-iceberg-0-keytab", and saveKeytabFromUri will
overwrite each other.
After changing to use catalog name(), each catalog configuration name in the
IRC is different, and the keytab path can be distinguished. ClosableJdbcCatalog
also uniformly uses name(), maintaining consistency with this JDBC Kerberos
modification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]