rdblue commented on a change in pull request #1618:
URL: https://github.com/apache/iceberg/pull/1618#discussion_r509516193



##########
File path: core/src/main/java/org/apache/iceberg/CatalogUtil.java
##########
@@ -117,4 +120,42 @@ private static void deleteFiles(FileIO io, 
Set<ManifestFile> allManifests) {
           }
         });
   }
+
+  /**
+   * Load FileIO, default to HadoopFileIO
+   * @param tableMetadata table metadata
+   * @param conf Hadoop configuration
+   * @return FileIO class
+   * @throws IllegalArgumentException if class path not found or
+   *  right constructor not found or
+   *  the loaded class cannot be casted to the given interface type
+   */
+  public static FileIO loadFileIO(TableMetadata tableMetadata, Configuration 
conf) {
+    if (tableMetadata != null) {
+      Map<String, String> properties = tableMetadata.properties();

Review comment:
       Looks like we only need `properties` here. I think that we should 
probably pass a map of properties to this method instead. That way changes to 
table metadata won't need to affect this class.




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

Reply via email to