bharos commented on PR #9183:
URL: https://github.com/apache/gravitino/pull/9183#issuecomment-3555868964

   > > > > > Gravitino doesn't have API to dedicated the metadata object 
existence. Gravitino will use loadxxx API to verify the metadata object 
existence. So we would better to catch `ForbiddenException` and return false.
   > > > > 
   > > > > 
   > > > > The current fix bypasses gravitinoCatalogClient.loadTable() entirely 
to avoid requiring LOAD_TABLE privilege for an existence check. Instead, it 
uses sparkCatalog.tableExists()] which goes directly to the backend, ie. 
Iceberg REST server.
   > > > > I think LOAD_TABLE should work with Iceberg REST server API ? Key 
point here is that I am bypassing gravitinoCatalogClient and directly hitting 
the Iceberg REST API ?
   > > > 
   > > > 
   > > > We don't hit Iceberg REST API directly. For Gravitino Spark connector: 
Spark -> Gravitino Spark connector -> Gravitino REST API (We don't use Iceberg 
REST API here) -> Hive backend/ Iceberg backed.
   > > 
   > > 
   > > @jerqi Just to make sure I understand the flow correctly here: 
BaseCatalog has gravitinoCatalogClient (which I thought connects to Gravitino 
REST APIs) and sparkCatalog (which I am using in the fix, as ` 
sparkCatalog.tableExists(ident);`) which I think hits the Iceberg REST API ?
   > > gravitinoCatalogClient -> Gravitino main REST API: 
http://gravitino-server:8090/api/ sparkCatalog -> Gravitino Iceberg REST 
server: http://gravitino-server:9001/iceberg/
   > > Isn't this the case ?
   > > Based on my above understanding , I thought it will skip the Gravitino 
API and the fix will work (as it hits the Iceberg REST API directly)
   > 
   > I got it. Yes, spark catalog will access IRC. But it's better to access 
Gravitino for metadata operations in Gravitino spark connector.
   
   Thanks @jerqi for confirming the workflow.
   I made the changes according to your recommendation + added a test


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