How to Reference the External Jar in Flink

前端 未结 3 1115
忘了有多久
忘了有多久 2021-02-08 11:13

everyone. I tried to reference my company jar in Flink in the way of copying it to $FLINK/lib in all of taskmanagers, but failed. And I don\'t want to package a fat jar, which i

3条回答
  •  隐瞒了意图╮
    2021-02-08 11:28

    In general, building a fat jar is the best way to go. Not sure how big your far jar gets, that you thinks it is "too heavy"?

    Copying jars to $FLINK/lib should work. However, you need to restart Flink such that the jars are added to Flink's classpath. Thus, this approach does not allow to dynamically add jars -- it should work for a bunch of stable jars however.

    In order to manage jars in the whole cluster, it might be helpful to use a NFS folder as $FLINK/lib to keep all TaskManagers in sync. Or you simple write a bash script to distribute your jars.

提交回复
热议问题