FANNG1 commented on code in PR #8189:
URL: https://github.com/apache/gravitino/pull/8189#discussion_r2588242735


##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java:
##########
@@ -113,7 +115,11 @@ public void initialize(
     resultConf.put("catalog_uuid", info.id().toString());
     IcebergConfig icebergConfig = new IcebergConfig(resultConf);
 
-    this.icebergCatalogWrapper = new IcebergCatalogWrapper(icebergConfig);
+    IcebergCatalogWrapper rawWrapper = new 
IcebergCatalogWrapper(icebergConfig);
+    this.icebergCatalogWrapper =
+        rawWrapper.getCatalog() instanceof SupportsKerberos
+            ? new 
KerberosAwareIcebergCatalogProxy(rawWrapper).getProxy(icebergConfig)

Review Comment:
   Could we create KerberosAwareIcebergCatalogProxy only when Kerberos is 
enabled? then when `doKerberosOperations` is invoked, we must do kerberos 
operations.
   ```
     public <R> R doKerberosOperations(Executable<R> executable) throws 
Throwable {
       Map<String, String> properties = this.properties();
       AuthenticationConfig authenticationConfig = new 
AuthenticationConfig(properties);
       if (!authenticationConfig.isKerberosAuth()) {
         return executable.execute();
       }
       xxx
   }
   ```



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