amogh-jahagirdar commented on a change in pull request #4259:
URL: https://github.com/apache/iceberg/pull/4259#discussion_r820920157
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueCatalog.java
##########
@@ -162,7 +173,28 @@ private String cleanWarehousePath(String path) {
@Override
protected TableOperations newTableOps(TableIdentifier tableIdentifier) {
- return new GlueTableOperations(glue, lockManager, catalogName,
awsProperties, fileIO, tableIdentifier);
+ if (isS3FileIOConfigured()) {
+ // Create different S3FileIO to use different credentials in future
+ FileIO s3FileIO = new S3FileIO(toTags(tableIdentifier));
+ s3FileIO.initialize(this.catalogProperties);
+ closeableGroup.addCloseable(s3FileIO);
+ return new GlueTableOperations(glue, lockManager, catalogName,
awsProperties, s3FileIO, tableIdentifier);
+ } else {
+ return new GlueTableOperations(glue, lockManager, catalogName,
awsProperties, fileIO, tableIdentifier);
+ }
+ }
+
+ private boolean isS3FileIOConfigured() {
+ String fileIOImpl =
this.catalogProperties.get(CatalogProperties.FILE_IO_IMPL);
Review comment:
Nit:"this" is not needed.
--
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]