简体   繁体   English

本地模式下Apache Flink任务管理器的数量

[英]Apache Flink number of taskmanagers in local mode

I am working on an Apache Flink (1.5.0) based streaming application. 我正在研究基于Apache Flink(1.5.0)的流应用程序。 As part of this I have launched Flink in local mode on my Windows machine. 为此,我在Windows机器上以本地模式启动了Flink。

In order to run my job with the degree of parallelism of 8, I need 8 Task managers providing one task slot each. 为了以8的并行度运行我的工作,我需要8个任务管理器,每个提供一个任务槽。

I added a task manager with following command: 我使用以下命令添加了任务管理器:

/cygdrive/b/Binaries Flink/flink-1.5.0/bin/taskmanager.sh' start

The first few times, a task manager was added successfully with following message: 前几次,成功添加了任务管理器,并显示以下消息:

[INFO] 3 instance(s) of taskexecutor are already running on ... .
Starting taskexecutor daemon on host ... .

After 5 task managers were available I got the same message 有5个任务管理器可用后,我得到了相同的消息

[INFO] 5 instance(s) of taskexecutor are already running on ... .
Starting taskexecutor daemon on host ... .

The problem is that a sixth task manager is never created. 问题是永远不会创建第六个任务管理器。 When I stop one task manager it goes down to 4, I can add one additional task manager but never more than 5 task managers. 当我停止一个任务管理器时,它会减少到4个,我可以添加一个附加的任务管理器,但不能超过5个。

Is there any limitation to the amount of task managers? 任务管理器的数量是否有限制? Did anyone experience a similar behaviour? 有没有人经历过类似的行为?

Thank you very much 非常感谢你

There is no limit of how many TaskManager you can start locally. 您可以在本地启动多少个TaskManager没有限制。 The only limit is the available resources you have on your local machine. 唯一的限制是您在本地计算机上拥有的可用资源。

If you are using the standalone mode in Flink 1.5.0 , then you can also set the number of slots per TaskManager to 7 by adding the following line to the flink-conf.yaml : 如果在Flink 1.5.0中使用独立模式,则还可以通过flink-conf.yaml添加到flink-conf.yaml来将每个TaskManager的插槽数设置为7

taskmanager.numberOfTaskSlots: 7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM