开发者社区> 问答> 正文

为什么Flink在运行时采用的是ChildFirstClassLoader?

Hi All, 看了Flink源代码,发现在实际运行的时候采用的是ChildFirstClassLoader,破坏了双亲模式,请问为什么采用这种设计,是有什么考虑吗?*来自志愿者整理的flink邮件归档

展开
收起
雪哥哥 2021-12-07 16:10:19 657 0
1 条回答
写回答
取消 提交回答
  • The benefit of inverted classloading is that jobs can use different library versions than Flink’s core itself, which is very useful when the different versions of the libraries are not compatible. The mechanism helps to avoid the common dependency conflict errors like IllegalAccessError or NoSuchMethodError. Different parts of the code simply have separate copies of the classes (Flink’s core or one of its dependencies can use a different copy than the user code). In most cases, this works well and no additional configuration from the user is needed

    You can find some details at https://ci.apache.org/projects/flink/flink-docs-master/monitoring/debugging_classloading.html, maybe it will help you.*来自志愿者整理的flink

    2021-12-07 16:33:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Flink CDC Meetup PPT - 龚中强 立即下载
Flink CDC Meetup PPT - 王赫 立即下载
Flink CDC Meetup PPT - 覃立辉 立即下载