LuciferYang commented on code in PR #14407:
URL: https://github.com/apache/gravitino/pull/14407#discussion_r4564892565


##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -218,22 +227,49 @@ public class FilesetCatalogOperations extends 
ManagedSchemaOperations
   }
 
   static class FileSystemCacheKey {
+    // The settings that decide how an HDFS file system logs in. The authority 
carries the principal
+    // only without its realm, and a location without a scheme has no 
authority at all.
+    private static final List<String> AUTHENTICATION_KEYS =
+        ImmutableList.of(
+            AuthenticationConfig.AUTH_TYPE_KEY,
+            AuthenticationConfig.IMPERSONATION_ENABLE_KEY,
+            KerberosConfig.PRINCIPAL_KEY,
+            KerberosConfig.KEY_TAB_URI_KEY,
+            HADOOP_SECURITY_AUTHENTICATION,
+            GRAVITINO_BYPASS + HADOOP_SECURITY_AUTHENTICATION,
+            HADOOP_SECURITY_PRINCIPAL,
+            GRAVITINO_BYPASS + HADOOP_SECURITY_PRINCIPAL,
+            HADOOP_SECURITY_KEYTAB,
+            GRAVITINO_BYPASS + HADOOP_SECURITY_KEYTAB,
+            HADOOP_KRB5_CONF,
+            GRAVITINO_BYPASS + HADOOP_KRB5_CONF,
+            CONFIG_RESOURCES);
+
     /**
      * When the path is a path without scheme such as 'file','hdfs', etc., 
then the scheme and
      * authority are both null
      *
-     * <p>NOTE: The filesystem cache key includes the schema, authority, and 
current user. Changes
-     * to the configuration of the fileset will not affect the cached 
filesystem.
+     * <p>NOTE: The filesystem cache key includes the scheme, authority, 
current user and the
+     * authentication settings of the configuration. Changes to other 
configuration of the fileset
+     * will not affect the cached filesystem.
      */
     @Nullable private final String scheme;
 
     @Nullable private final String authority;
     private final String currentUser;
+    private final Map<String, String> authenticationSettings;
 
-    FileSystemCacheKey(String scheme, String authority) {
+    FileSystemCacheKey(String scheme, String authority, Map<String, String> 
conf) {
       this.scheme = scheme;
       this.authority = authority;
       this.currentUser = PrincipalUtils.getCurrentUserName();
+      Map<String, String> settings = new HashMap<>();
+      for (String key : AUTHENTICATION_KEYS) {
+        if (conf.containsKey(key)) {
+          settings.put(key, conf.get(key));

Review Comment:
   ok



-- 
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]

Reply via email to