yihua commented on code in PR #11259:
URL: https://github.com/apache/hudi/pull/11259#discussion_r1608726591


##########
hudi-common/src/main/java/org/apache/hudi/storage/HoodieStorageUtils.java:
##########
@@ -33,6 +35,13 @@ public static HoodieStorage getStorage(String basePath, 
StorageConfiguration<?>
   }
 
   public static HoodieStorage getStorage(StoragePath path, 
StorageConfiguration<?> conf) {
-    return getIOFactory(conf).getStorage(path);
+    String storageClass = 
conf.getString(HoodieStorageConfig.HOODIE_STORAGE_CLASS.key())
+        .orElse(HoodieStorageConfig.HOODIE_STORAGE_CLASS.defaultValue());
+    try {
+      return (HoodieStorage) ReflectionUtils.loadClass(

Review Comment:
   The problem before this change is that `HoodieStorage` instantiated through 
reflection with the path and storage configuration through 
`HoodieStorageUtils.getStorage` does not work with a provided file system 
instance like `TrinoFileSystem`.  This PR gets rid of all usages of 
`HoodieStorageUtils.getStorage` on the read path.  With this PR, 
`HoodieStorage` instance is passed down from the meta client as much as 
possible.  For engines like Spark, we still have the reflection code for 
`HoodieHadoopStorage` to make it work on the executor side.



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

Reply via email to