当前位置:网站首页>Detailed explanation of Flink parallelism and slot
Detailed explanation of Flink parallelism and slot
2022-07-07 19:54:00 【A sharp fire rages to the sky】
Flink Parallelism and Slot Detailed explanation
Address :
https://blog.csdn.net/zuodaoyong/article/details/106178488?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&utm_relevant_index=2
One 、 Concept
1、Task: There are multiple with the same function in one stage subTask Set , similar Spark Of TaskSet
2、SubTask: It is the smallest execution unit of the task , It's a Java Class , Complete the specific calculation logic
3、Slot: Isolation unit of computing resources , One Slot Can run multiple SubTask, But these SubTask It has to be from the same application At different stages of subTask.
Be careful :Flink Divide Task There are four main situations :
(1) similar keyBy,broadcast,rebalance Wait for the operator to generate shuffer
(2)Parallelism( Parallelism ) change
(3)new chain, That is, execute on the operator startNewChain() after , This operator is separate from the operator previously executed .
(4)disableChaining, Execute on the operator disableChaining(), That is, the beginning to the end of the operator , Generate a single task. Use scenarios , For example, the logic of this operator is complex , Let the operator use one alone task Internal SubTask.
Two 、slot
Flink Every one of them TaskManager It's all one JVM process , It may be in slot Execute one or more subTask.
slot The quantity is usually the same as each TaskManager Node availability CPU The number of cores is proportional . commonly Slot The number is per node CPU Number of cores .
Slot The number of is determined by flink-conf.yml In profile taskmanager.numberOfTaskSlots Set up .
Be careful : The same slot Cannot execute the same task The multiple subTask.
Expand :slotSharingGroup(String slotSharingGroup) Sharing slot
hypothesis flink Cluster has 3 Nodes , One jobManager,2 individual TaskManager. Every TaskManager Yes 2 individual Slot. That is, the cluster is a total of 4 individual slot
Task assignment slot The default name is default.

take wordcount For example , Run the application,5 individual task,14 individual subTask Are running on shared slot be known as "default" On .
If flatMap On the call slotSharingGroup(“slot_name”), be flatMap Put it under the name slot_name Of slot On .
Posterior operator map,keyBy,print All will be assigned slot The name is slot_name Up operation .
that , Abnormal conditions have occurred , In the cluster 4 individual slot, There is one default Of slot Running in is source,flatMap The parallelism of is 4, Need to assign to 4 It's called slot_name Of slot On . however slot_name Only 3 individual . Resulting in insufficient resources , Task deployment failed .
The solution is to adjust the parallelism to 3, Or cancel slotSharingGroup Set up .
summary :
(1)Flink The default name of the task resource slot of is default
(2) Call slotSharingGroup Set the slot where the operator runs
(3) If you change the name of the shared slot , The following operator does not set the name of the shared slot , Then it is consistent with the slot name changed last time
(4) Slot names are different subTask Cannot execute in the same slot
3、 ... and 、 Parallelism
1、 Setting of parallelism
(1)Operator Level( Operator level )
(2)Execution Environment Level( At the environmental level )
(3)Client Level( Client level )
(4)System Level( System level , That is, configure )
Parallelism sets priority :Operator Level > Execution Environment Level > Client Level > System Level
边栏推荐
- 歌单11111
- How to share the same storage among multiple kubernetes clusters
- [confluence] JVM memory adjustment
- LeetCode 515(C#)
- 实训九 网络服务的基本配置
- R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
- Flink并行度和Slot详解
- Visual Studio 插件之CodeMaid自动整理代码
- 爬虫实战(七):爬王者英雄图片
- PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
猜你喜欢

Kunpeng developer summit 2022 | Kirin Xin'an and Kunpeng jointly build a new ecosystem of computing industry

一张图深入的理解FP/FN/Precision/Recall

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」

J ü rgen schmidhub reviews the 25th anniversary of LSTM papers: long short term memory All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversar

杰理之发起对耳配对、回连、开启可发现、可连接的轮循函数【篇】

Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記

How to share the same storage among multiple kubernetes clusters
![最多可以参加的会议数目[贪心 + 优先队列]](/img/f3/e8e939e0393efc404cc159d7d33364.png)
最多可以参加的会议数目[贪心 + 优先队列]

项目经理『面试八问』,看了等于会了

PMP每日一练 | 考试不迷路-7.7
随机推荐
Tips and tricks of image segmentation summarized from 39 Kabul competitions
剑指 Offer II 013. 二维子矩阵的和
LeetCode 648(C#)
注解。。。
Download from MySQL official website: mysql8 for Linux X Version (Graphic explanation)
九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
Visual Studio 插件之CodeMaid自动整理代码
论文解读(ValidUtil)《Rethinking the Setting of Semi-supervised Learning on Graphs》
Mysql, sqlserver Oracle database connection mode
Jürgen Schmidhuber回顾LSTM论文等发表25周年:Long Short-Term Memory. All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversarial RL. Soccer learn
The research group of the Hunan Organizing Committee of the 24th China Association for science and technology visited Kirin Xin'an
IP tools
[Verilog advanced challenge of Niuke network question brushing series] ~ multi bit MUX synchronizer
R language ggplot2 visualization: use the ggqqplot function of ggpubr package to visualize the QQ graph (Quantitative quantitative plot)
RESTAPI 版本控制策略【eolink 翻译】
转置卷积理论解释(输入输出大小分析)
Training IX basic configuration of network services
杰理之相同声道的耳机不允许配对【篇】
怎么在手机上买股票开户 股票开户安全吗
PMP每日一练 | 考试不迷路-7.7