flink yarn-application模式下,是否可以自定义每个flink任务的yarn.provided.lib.dirs #3743
Unanswered
StoneForests
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
"/streampark/jars" stores the user's yarn-app mode public jar |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Java Version
java1.8
Scala Version
2.12
StreamPark Version
2.1.4
Flink Version
1.14.4
deploy mode
yarn-application
我参照streampark官网教程 原生flink作业参数 ,增加了两个动态参数

任务运行起来后,第一个自定义参数生效了,但第二个参数(yarn.provided.lib.dirs)没有生效

我看了flink的日志,其中yarn.provided.lib.dirs出现了两次,均为streampark的默认值,而非streampark界面上自定义值:
想请教一下:在yarn-application模式下,是不是无法自定义yarn.provided.lib.dirs的值?
hdfs:///streampark/flink/flink-1.14.4/lib;hdfs:///streampark/jars;hdfs:///streampark/plugins;hdfs:///streampark/workspace/<appid>/lib;hdfs://zq-dev-cluster/streampark/shims/flink-1.14如果真是如此,想问一下是否可以放开这个限制,允许yarn-application模式能在任务中指定加载其它目录中的依赖呢,具体场景如下:
1、我们开发了一个flink交换组件jar,该jar依赖了非常多第三方jar,如果合成一个shadejar得好几百MByte,所以我们把主jar和依赖jar拆开,把依赖jar预置到hdfs:///streampark/extlib;中。
2、在使用步骤1的主jar建立custom code任务时,允许用户指定yarn.provided.lib.dirs为hdfs:///streampark/extlib;
3、在使用其它的jar建立custom code任务r,或者flink sql任务时,不需要用户指定yarn.provided.lib.dirs,此时streampark会使用默认的yarn.provided.lib.dirs目录。
之所以我们没有把jar全部放到hdfs:///streampark/jars目录中,是为了避免在步骤3中的flink任务也去下载不必要的依赖,浪费网络和存储。
期待您的回复,谢谢!
Beta Was this translation helpful? Give feedback.
All reactions