yihua commented on code in PR #17661:
URL: https://github.com/apache/hudi/pull/17661#discussion_r2638519345
##########
hudi-common/src/main/java/org/apache/hudi/storage/HoodieStorageUtils.java:
##########
@@ -44,4 +44,27 @@ public static HoodieStorage getStorage(StoragePath path,
StorageConfiguration<?>
throw new HoodieException("Unable to create " + storageClass, e);
}
}
+
+ /**
+ * Creates a {@link HoodieStorage} instance using custom constructor
parameters.
+ * This method uses reflection to instantiate the storage class with
provided parameter types.
+ *
+ * @param conf storage configuration containing the storage class name
+ * @param paramTypes array of parameter types for the constructor
+ * @param params array of parameter values for the constructor
+ * @return {@link HoodieStorage} instance
+ * @throws HoodieException if unable to create the storage instance
+ */
+ public static HoodieStorage getStorage(StorageConfiguration<?> conf,
Review Comment:
Should we remove `HoodieStorageUtils` and directly use
`HoodieStorageFactory` for construction? Move all instantiation logic into
`HoodieStorageFactory`.
--
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]