jackye1995 commented on a change in pull request #1618:
URL: https://github.com/apache/iceberg/pull/1618#discussion_r509800216
##########
File path:
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -108,7 +108,8 @@ protected String tableName() {
@Override
public FileIO io() {
if (fileIO == null) {
- fileIO = new HadoopFileIO(conf);
+ // avoid refresh metadata because refresh() calls io() again
+ fileIO = CatalogUtil.loadFileIO(getCurrentMetadataNoRefresh(), conf);
Review comment:
Yeah I am also just thinking about the loop issue. If someone tries to
create a new table, at that point of time `currentMetadata` is null, so it will
choose use the default `FileIO` to write the initial metadata, and the new
`FileIO` might not be able to read it, which would be a problem.
That means when creating the table it needs to check if the
`io.file-io.impl` is set in the properties and update the `FileIO`
implementation accordingly in the `doCommit` method. But it feels like an ugly
hack...
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]