当前位置:网站首页>Understanding of Flink parallelism
Understanding of Flink parallelism
2022-07-24 06:15:00 【sf_ www】
Concept description
One Flink Program consists of multiple Operator form (source、transformation and sink).
One Operator By multiple parallel Task( Threads ) To execute , One Operator Parallel of Task( Threads ) The number is called the Operator( Mission ) Parallelism of (Parallel). That is, parallelism is relative to Operator Speaking of .
The official pair is listed below Operator Explanation :
Operator
Node of a Logical Graph. An Operator performs a certain operation, which is usually executed by a Function. Sources and Sinks are special Operators for data ingestion and data egress.
Logical Graph
A logical graph is a directed graph where the nodes are Operators and the edges define input/output-relationships of the operators and correspond to data streams or data sets. A logical graph is created by submitting jobs from a Flink Application.
Logical graphs are also often referred to as dataflow graphs.
The description in the source code :
/** * Abstract base class for all operators. An operator is a source, sink, or it applies an operation * to one or more inputs, producing a result. * * @param <OUT> Output type of the records output by this operator */@Internalpublic abstract class Operator<OUT> implements Visitable<Operator<?>> {
/** * Sets the parallelism for this contract instance. The parallelism denotes how many parallel * instances of the user function will be spawned during the execution. * * @param parallelism The number of parallel instances to spawn. Set this value to {@link * ExecutionConfig#PARALLELISM_DEFAULT} to let the system decide on its own. */ public void setParallelism(int parallelism) { this.parallelism = parallelism; }Setting of parallelism
There can be 4 Levels to set Operator Parallelism of
1. Operator Level( Operator level )
2. Execution Environment Level( Execution environment level )
3. Client Level( Client level )
4. System Level( System default level , Not recommended , Because it will affect all operations )
1. Operator Level
Use the corresponding operator.setParallelism(xxx) that will do
2. Execution Environment Level
Use env.setParallelism(xxx) (env namely StreamExecutionEnvironment)
3. Client Level
Parallelism can be changed on the client job Submitted to the Flink Time setting .
about CLI client , Can pass -p Parameter specifies the degree of parallelism
./bin/flink run -p 3 ...
4. System Level
At the system level, you can set flink-conf.yaml In the document parallelism.default Property to specify the default parallelism for all execution environments .
4 Priority of setting methods
Priority of parallelism : Operator level > env Level > Client level > System default level
That is to say, the value with high priority can override the value with low priority if it is set .
In addition, the parallelism set will not always be the same as that of the actual execution , such as If source Cannot be executed in parallel , Even if the parallelism is specified as multiple , It doesn't work ;kafka Read, etc .
In actual production , It is recommended to specify the degree of parallelism at the operator level , Convenient display and precise resource control .
边栏推荐
- Unity 3D帧率统计脚本
- Write the list to txt and directly remove the comma in the middle
- Search of two-dimensional array of "sword finger offer" C language version
- Oserror: [winerror 127] the specified program cannot be found. Error loading “caffe2_detectron_ops.dll“ or one of its dependencies
- 常见AR以及MR头戴显示设备整理
- 将内网映射到公网【无需公网IP】
- unity2D横版游戏跳跃实时响应
- data normalization
- 论文阅读-Endmember-Guided Unmixing Network (EGU-Net) 端元指导型高光谱解混网络
- 不租服务器,自建个人商业网站(2)
猜你喜欢

不租服务器,自建个人商业网站(3)

Statistical analysis of catering data --- Teddy cloud course homework

Headlong platform operation

Synergy LAN realizes multi host shared keyboard and mouse (AMD, arm)

Xshell remote access tool

Sorting of common AR and MR head mounted display devices

Paper reading endmember guided unmixing network (EGU net)

IP笔记(9)

Yolov5 learning summary (continuously updated)

餐饮数据统计分析---泰迪云课程大作业
随机推荐
First knowledge of graphics
机器学习&深度学习 入门资料分享总结
Opencv reads avi video and reports an error: number < Max_ number in function ‘icvExtractPattern
通道注意力与空间注意力模块
公网使用Microsoft Remote Desktop远程桌面,随时远程办公
Oserror: [winerror 127] the specified program cannot be found. Error loading “caffe2_detectron_ops.dll“ or one of its dependencies
What is monotonic queue
Openpose2d转换3d姿态识别
UE4 random generation of items
Sort ArrayList < ArrayList < double> >
Channel attention and spatial attention module
JDBC初级学习 ------(师承尚硅谷)
Foundation of JUC concurrent programming (7) -- multithread lock
碰壁记录(持续更新)
Foundation of JUC concurrent programming (6) -- lock lock
The detailed process of connecting MySQL with QT and outputting data to QT window tablewidget.
Lua Foundation
Kernel pwn 基础教程之 Heap Overflow
IP笔记(8)
Unicast, multicast, broadcast, tool development, introduction to QT UDP communication protocol development and source code of development tools