当前位置:网站首页>The yarn deployment mode depends on the pre upload settings
The yarn deployment mode depends on the pre upload settings
2022-06-22 04:59:00 【PONY LEE】
flink on yarn Upload the dependent packages required for running to the remote ( Such as :hdfs System ), This will make job submission very lightweight , Because of what is needed Flink jar And Applications jar Will be obtained by the specified remote , Instead of being sent to the cluster by the client .
- Application Mode on yarn
./bin/flink run-application \
-t yarn-application \
-Dyarn.application.name="flink-yarn-application" \
-Dtaskmanager.numberOfTaskSlots=5 \
-Djobmanager.memory.process.size=1024m \
-Dtaskmanager.memory.process.size=1024m \
-Drest.flamegraph.enabled=true \
-Dyarn.provided.lib.dirs="hdfs://bdptest/data/flink-1.15.0/lib;hdfs:///data/flink-1.15.0/plugins" \
hdfs:///data/flink-1.15.0/flink-demo01-1.0-SNAPSHOT-pony-shade.jar
NOTE:
Flink The execution of an application consists of two phases :
- pre-flight: stay main() Start after method call , structure job graph.
- runtime: Once the user code calls execute() This stage will be triggered .
Only in application Pattern main Function depends on jar package (flink-dist-jar) Can be put into the remote distributed file system , because application Mode main Method in jobmanager perform .
But for Session Patterns and Per-Job Pattern ,main Method is executed on the client .
- Per-Job Cluster Mode on yarn
./bin/flink run -t yarn-per-job --detached \
-Dyarn.application.name="flink-yarn-perjob" \
-Dyarn.provided.lib.dirs="hdfs://bdptest/data/flink-1.15.0/lib;hdfs:///data/flink-1.15.0/plugins" \
./examples/streaming/TopSpeedWindowing.jar
- Session Mode on yarn
./bin/yarn-session.sh --detached \
-Dyarn.application.name="flink-yarn-session" \
-Dtaskmanager.numberOfTaskSlots=5 \
-Dyarn.provided.lib.dirs="hdfs://bdptest/data/flink-1.15.0/lib;hdfs:///data/flink-1.15.0/plugins" \
-Drest.flamegraph.enabled=true
./bin/flink run ./examples/streaming/TopSpeedWindowing.jar
【yarn.provided.lib.dirs】 Parameter interpretation
Specify the path where the remote dependent package is located , It can be multiple paths , Use semicolons to divide . The dependent packages under this path are uploaded in advance , And globally readable .
The operation of this mode makes flink Job submission becomes very light , Avoid uploading from the local client Flink rely on ( for example :Flink-dist、lib/、plugins/), To speed up the job submission process .
in addition ,YARN They are cached on the node , This eliminates the need to download dependencies for every application every time . This is also the community in flink-1.11 The significance of introducing a new deployment pattern in version .
NOTE:
If you specify yarn.provided.lib.dirs, There are the following precautions :
- Need to put lib Bao He plugins For packet address ; Separate , You can also see from the above example , take plugins bag lib There may be package conflict errors in the directory
- plugins The package path address must begin with plugins ending , For example, in the example above hdfs:///data/flink-1.15.0/plugins
Example :
hdfs://{namenode_address}/data/flink-1.15.0/lib;hdfs://{namenode_address}/data/flink-1.15.0/plugins;hdfs://{namenode_address}/data/flink-1.15.0/flink-dist
边栏推荐
- MySQL day01 class notes
- Zhongmin online: sharing online channel resources with "points" as the link
- NHibernate method for viewing generated SQL statements
- Go learning (II. Built in container)
- go学习(二、内建容器)
- 【故障诊断】使用多线程,程序不报错,但就是不运行
- mysql常用sql
- Redis 主从复制
- Postman uses (reads) JSON files for batch testing
- 获取DPI函数返回值永远是96 | 获取DPI函数返回值不正确 | GetDpiForMonitor/GetDeviceCaps返回值不正确的原因
猜你喜欢

Qt保存QTextEdit内存至.txt文件中

Overrides vs overloads of methods

获取DPI函数返回值永远是96 | 获取DPI函数返回值不正确 | GetDpiForMonitor/GetDeviceCaps返回值不正确的原因

Accurate identification of bank card information - smart and fast card binding

The Impossible Triangle of NLP?

VirtualBox 6.1.34 release

Pull down refresh, push up load (easy to use, finally)

JUC - thread interrupt and thread waiting and wakeup (locksupport)

Ora-15063: ASM discovered an insufficient number of disks for diskgroup

Use echart to draw 3D pie chart, dashboard and battery diagram
随机推荐
Chapter 6 infinite series_ Fourier series
Importbeandefinitionregistrar registers beans with the container
基于深度学习的目标检测算法面试必备(RCNN~YOLOv5)
Lightweight CNN design skills
Understanding of service container, service provider and facade of laravel
Reading notes on how MySQL works [updating]
The best time to climb a ladder & sell shares (notes of the runner)
获取DPI函数返回值永远是96 | 获取DPI函数返回值不正确 | GetDpiForMonitor/GetDeviceCaps返回值不正确的原因
Progress warning and problem management of progress control in Zhiyuan project management SPM system
Compilation des connaissances communes de la base de données numpy
MySQL day01 class notes
NHibernate method for viewing generated SQL statements
How much does it cost to buy a fixed-term life insurance with an insured amount of 500000 at the age of 42? Is there any product recommendation
go学习(二、内建容器)
[user guide] use of Tsinghua source
The feeling of leaving full-time for a single month!
使用Echart绘制3D饼环图、仪表盘、电池图
Go learning (II. Built in container)
使用matplotlib实现GUI交互效果
How to deal with too small picture downloaded from xuexin.com