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


##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java:
##########
@@ -113,7 +115,18 @@ 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);
+    // We have replaced `UserGroupInformation#loginUserFromKeytab` with
+    // `UserGroupInformation#loginUserFromKeytabAndReturnUGI`, the former will 
change the current
+    // login user globally, which is not expected in Gravitino as we are going 
to support multiple
+    // catalogs within the same class loader. The proxy will ensure each 
catalog has its own
+    // `UserGroupInformation` instance and I have removed old 
`HiveBackendProxy`. In
+    // IcebergCatalogWrapperProxy, we will do both Kerberos access and user 
impersonation if needed,
+    // so please check the code in IcebergCatalogWrapperProxy for details.
+    this.icebergCatalogWrapper =

Review Comment:
   This is the entrypoint for Gravitino Iceberg catalog,   could you support 
IRC and add related test 
too?https://github.com/apache/gravitino/blob/80c9bd7502ce890c94126a6f3a558434aa8ef137/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/IcebergCatalogWrapperManager.java#L101-L104?
 



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