欢迎有识之士 fix

1. Kyro 包冲突

image.png
解法:将 4.0.2 的 kyro 包拷贝到 flink lib 下或者在 hudi-flink-bundle 中 shade 掉 kyro 包

0.11.0 已在 PR:https://github.com/apache/hudi/pull/4251 shade kryo-shaded 包,需要的同学可以 cherry-pick 到低版本

2. servet-api 包冲突

会导致 Javaline 的 server 一直无法启动

参考:https://github.com/tipsy/javalin/issues/550

解法:添加依赖

  1. <dependency>
  2. <groupId>javax.servlet</groupId>
  3. <artifactId>javax.servlet-api</artifactId>
  4. <version>3.1.0</version>
  5. </dependency>

3. 类加载顺序问题

Standalone session 集群的 Flink 可能会碰到这个问题:

Caused by: java.lang.ClassCastException: org.apache.hudi.common.metrics.LocalRegistry cannot be cast to org.apache.hudi.common.metrics.Resigtry

解法:参考 Flink 的配置: https://ci.apache.org/projects/flink/flink-docs-release-1.12/deployment/config.html#classloader-resolve-order
设置成 “parent-first”.

Flink 1.13.2 + hudi 0.10 master 分支执行离线压缩时会抛:

Exception in thread "Thread-3" java.lang.IllegalStateException: Trying to access closed classloader. Please check if you store classloaders directly or indirectly in static fields. If the stacktrace suggests that the leak occurs in a third party library and cannot be fixed immediately, you can disable this check with the configuration 'classloader.check-leaked-classloader'.
    at org.apache.flink.runtime.execution.librarycache.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.ensureInner(FlinkUserCodeClassLoaders.java:164)
    at org.apache.flink.runtime.execution.librarycache.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.getResource(FlinkUserCodeClassLoaders.java:183)
    at org.apache.hadoop.conf.Configuration.getResource(Configuration.java:2780)

按照错误提示的建议在flink-conf.yaml文件中添加 classloader.check-leaked-classloader: false 参数后再执行就可以了。