Flink:Jobmanager UI 中设置的并行度与任务槽有什么关系? [英] Flink: how does the parallelism set in the Jobmanager UI relate to task slots?

查看:18
本文介绍了Flink:Jobmanager UI 中设置的并行度与任务槽有什么关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有 8 个任务管理器和 16 个任务槽.如果我使用 Jobmanager UI 提交作业并将并行度设置为 8,我是否只使用 8 个任务槽?

Let's say I have 8 task managers with 16 task slots. If I submit a job using the Jobmanager UI and set the parallelism to 8, do I only utilise 8 task slots?

如果我有 8 个有 8 个插槽的任务管理器,并以 8 的并行度提交同一个作业怎么办?它是完全一样的吗?还是数据处理方式有差异?

What if I have 8 task managers with 8 slots, and submit the same job with a parallelism of 8? Is it exactly the same thing? Or is there a difference in the way the data is processed?

谢谢.

推荐答案

Flink 集群中的任务槽总数定义了最大并行度,但使用的槽数可能会超过实际并行度.例如,考虑这个工作:

The total number of task slots in a Flink cluster defines the maximum parallelism, but the number of slots used may exceed the actual parallelism. Consider, for example, this job:

如果在具有 2 个任务管理器的集群中以 2 个并行运行,每个管理器提供 3 个插槽,调度程序将使用 5 个任务插槽,如下所示:

If run with parallelism of two in a cluster with 2 task managers, each offering 3 slots, the scheduler will use 5 task slots, like this:

然而,如果基本并行度增加到 6,那么调度器会这样做(注意在这个例子中接收器保持并行度为 1):

However, if the base parallelism is increased to six, then the scheduler will do this (note that the sink remains at a parallelism of one in this example):

参见 Flink 的分布式运行时环境更多信息.

这篇关于Flink:Jobmanager UI 中设置的并行度与任务槽有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆