aokolnychyi commented on a change in pull request #395: Remove Hadoop
Configuration dependency in BaseMetastoreTableOperations
URL: https://github.com/apache/incubator-iceberg/pull/395#discussion_r315155798
##########
File path:
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
##########
@@ -43,17 +41,15 @@
private static final String METADATA_FOLDER_NAME = "metadata";
private static final String DATA_FOLDER_NAME = "data";
- private final Configuration conf;
private final FileIO fileIo;
private TableMetadata currentMetadata = null;
private String currentMetadataLocation = null;
private boolean shouldRefresh = true;
private int version = -1;
- protected BaseMetastoreTableOperations(Configuration conf) {
- this.conf = conf;
- this.fileIo = new HadoopFileIO(conf);
+ protected BaseMetastoreTableOperations(FileIO fileIo) {
Review comment:
As an alternative, we can consider providing an abstract method that
subclasses should implement. That way, we have more flexibility over
initializing `FileIO`. Calling parent constructors must always be the first
call in child constructors, which means we will have problems when initializing
`FileIO` requires calling another method.
@jerryshao what do you think?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]