deniskuzZ commented on code in PR #6789:
URL: https://github.com/apache/hive/pull/6789#discussion_r4314074254


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -278,17 +278,8 @@ public HiveAuthorizationProvider 
getAuthorizationProvider() {
 
   @Override
   public void configureInputJobCredentials(TableDesc tableDesc, Map<String, 
String> secrets) {
-    if 
(!IcebergVendedCredentialUtil.requestsVendedCredentials(tableDesc.getProperties(),
 conf)) {
-      return;
-    }
-    try {
-      Table table =
-          
IcebergVendedCredentialUtil.getTableWithVendedCredentials(tableDesc.getProperties(),
 conf);
-      String catalogName = 
tableDesc.getProperties().getProperty(InputFormatConfig.CATALOG_NAME);
-      IcebergVendedCredentialUtil.propagateToJob(table, catalogName, null, 
secrets, conf);
-    } catch (NoSuchTableException ex) {
-      // Table may not exist yet for CTAS; credentials will not be available.
-    }
+    RestCatalogScanPlanningUtil.propagateInputJobCredentials(tableDesc, 
secrets, conf);

Review Comment:
   two `propagateInputJobCredentials` calls with the same name but different 
jobs: one copies catalog auth config (`iceberg.catalog.<name>.*` secrets) so 
the AM can reach the REST catalog, the other copies vended storage credentials 
for the readers. 
   
   Could we name them after what they carry, e.g. 
`RestCatalogScanPlanningUtil.propagateCatalogSecretsToJob` (pairs with 
`propagateCatalogPropertiesToJob`) and 
`IcebergVendedCredentialUtil.propagateVendedCredentialsToJob`?
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to