You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "mothukur (via GitHub)" <gi...@apache.org> on 2024/12/13 07:13:07 UTC
[I] Allow reuse of FileIO object in GlueCatalog for manifest caching to work [iceberg]
mothukur opened a new issue, #11776:
URL: https://github.com/apache/iceberg/issues/11776
### Apache Iceberg version
1.7.1 (latest release)
### Query engine
None
### Please describe the bug 🐞
The current GlueCatalog implementation does not allow for the reuse of the FileIO object, leading to inefficient usage of manifest cache implemented in `ManifestFiles` class.
**Problematic Code**
The `GlueTableOperations` class creates a new `FileIO` object for each instance:
https://github.com/apache/iceberg/blob/apache-iceberg-1.7.1/aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java#L113
```
public FileIO io() {
if (fileIO == null) {
fileIO = initializeFileIO(this.tableCatalogProperties, this.hadoopConf);
}
return fileIO;
}
```
This prevents the `ManifestFiles` class from using the cache :
https://github.com/apache/iceberg/blob/apache-iceberg-1.7.1/core/src/main/java/org/apache/iceberg/ManifestFiles.java#L75
```
static ContentCache contentCache(FileIO io) {
return CONTENT_CACHES.get(
io,
fileIO ->
new ContentCache(
cacheDurationMs(fileIO), cacheTotalBytes(fileIO), cacheMaxContentLength(fileIO)));
}
```
**Proposed Solution**
Add a constructor or method to the `GlueCatalog` class that accepts a `FileIO` object or a function that builds a `FileIO` object, similar to `JdbcCatalog`:
https://github.com/apache/iceberg/blob/apache-iceberg-1.7.1/core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java#L99
```
public JdbcCatalog(
Function<Map<String, String>, FileIO> ioBuilder,
Function<Map<String, String>, JdbcClientPool> clientPoolBuilder,
boolean initializeCatalogTables) {
this.ioBuilder = ioBuilder;
this.clientPoolBuilder = clientPoolBuilder;
this.initializeCatalogTables = initializeCatalogTables;
}
```
### Willingness to contribute
- [X] I can contribute a fix for this bug independently
- [X] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time
--
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: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Allow reuse of FileIO object in GlueCatalog for manifest caching to work [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #11776: Allow reuse of FileIO object in GlueCatalog for manifest caching to work
URL: https://github.com/apache/iceberg/issues/11776
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Allow reuse of FileIO object in GlueCatalog for manifest caching to work [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11776:
URL: https://github.com/apache/iceberg/issues/11776#issuecomment-2964603447
This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Allow reuse of FileIO object in GlueCatalog for manifest caching to work [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11776:
URL: https://github.com/apache/iceberg/issues/11776#issuecomment-3006593434
This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org