luoyuxia commented on issue #2426: URL: https://github.com/apache/fluss/issues/2426#issuecomment-3798593249
> [@luoyuxia](https://github.com/luoyuxia) How does this custom classloader work with Paimon plugins? Specifically, how does it identify which JAR files are Paimon plugins and should be included in the classloader? Note that these JARs are added by users into the flink/spark lib folder. @wuchong Sorry for not express it clearly. Here is my idea: - Instantiate a `ComponentClassLoader` with the bundled paimon jar path as `COMPONENT_CLASSPATH` and the application classloader(which has access to flink/lib) as the owner classloader - Ensure Paimon's Service Interfaces (like FileIOLoader) are loaded by the Owner (App) ClassLoader - When the paimon code calls ``` ServiceLoader.load(FileIOLoader.class, FileIOLoader.class.getClassLoader()) ``` The getClassLoader() returns the App Classloader. This allows the ServiceLoader to "see" and instantiate any FileIO implementations (like S3, OSS, or Azure) that the user has placed in the flink/lib directory, But I'm not sure whether it will have other traps (like make more classes loaded by owner classloder) when implemtation. -- 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]
