Hi there,

I'm trying to consult whether a flink class loader(ParentFirstClassLoader
or ChildFirstClassLoader) must be a singleton?

I met a problem with the below error message by using sql-client to submit
sql jobs to a standalone session model cluster with Flink 1.13.3.
I also tried ParentFirstClassLoader & ChildFirstClassLoader, both of them
will meet this problem.

Caused by: java.lang.ClassCastException:
class org.apache.hudi.common.fs.HoodieWrapperFileSystem cannot be cast to
class org.apache.hudi.common.fs.HoodieWrapperFileSystem
(org.apache.hudi.common.fs.HoodieWrapperFileSystem
is in unnamed module of loader
org.apache.flink.runtime.execution.librarycache.
FlinkUserCodeClassLoaders$ParentFirstClassLoader @*384d2142*;
org.apache.hudi.common.fs.HoodieWrapperFileSystem
is in unnamed module of loader
org.apache.flink.runtime.execution.librarycache.
FlinkUserCodeClassLoaders$ParentFirstClassLoader @*35e21dd1*)

>From this documentation, it shows I might have two versions of the class
which are different in application code and flink libraries.
But in my case, Flink should don't contains HoodieWrapperFileSystem class,
and I didn't add the hudi-flink-bundle jar to flink lib folder, instead, i
used sql-client.sh embedded -j xxxx/huid-flink-bundle-xxx.jar.

So I'm wondering if the root reason is that they are loaded by two
classloader instances? And it seems that FlinkUserCodeClassLoaders is a
singleton, but ParentFirstClassLoader and ChildFirstClassLoader aren't from
flink source code.

Reply via email to