Flink 作业集群与会话集群——部署和配置
Flink Job Cluster vs Session Cluster - deploying and configuration
我正在研究 docker/k8s Flink 1.9.1 的部署可能性。
我在 reading/watching [1][2][3][4] 之后。
目前我们确实认为我们会尝试使用 Job Cluster 方法,尽管
我们想知道这方面的社区趋势是什么?我们宁愿
每个 Flink 集群不要部署超过一个作业。
无论如何,我想知道一些事情:
如何更改作业的每个任务管理器的任务槽数和
会话集群?在我的例子中,我在 VirtualBox 上 运行 docker 我有 4
分配给这台机器的 CPU。然而,每个任务管理器都产生了
Job Cluster 只有一个任务槽。但是,对于 Session Cluster,在
同一台机器,每个任务管理器都有 4 个任务槽。
在这两种情况下,Flink 的 UI 表明每个任务管理器有 4 个 CPU。
如果我使用的是工作集群,我该如何重新提交工作。我指的是这种用法
案例[5]。你可能会说我必须重新开始工作,但不同的是
争论。这样做的程序是什么?顺便说一句,我正在使用检查点。
我是否应该终止所有任务管理器容器并重新运行它们
参数?
如何使用 Session Cluster 重新提交作业?
如何为 Job/Session 集群提供日志配置?
我有一个案例,我在 log4j.properties 中更改了日志级别和日志格式
这在本地 (IDE) 环境中运行良好。但是当我建造
fat jar 和 运行 基于这个 jar 的作业集群它接缝了我的 log4j
属性不会传递给集群。我看到了原始格式和
原始(信息)级别。
谢谢,
[1] https://youtu.be/w721NI-mtAA
[2] https://youtu.be/WeHuTRwicSw
[3]https://ci.apache.org/projects/flink/flink-docs-stable/ops/deployment/docker.html
[4]https://github.com/apache/flink/blob/release-1.9/flink-container/docker/README.md
Currently we do think that we will try go with Job Cluster approach although we would like to know what is the community trend with this? We would rather not deploy more than one job per Flink cluster.
这个问题可能更适合用户邮件列表。
How can I change the number of task slots per task manager for Job and Session Cluster?
您可以通过配置选项控制它 taskmanager.numberOfTaskSlots
How I can resubmit job using Session Cluster?
这是描述here. The bottom line is that you create a savepoint and resume your job from it. It is also possible to resume a job from retained checkpoints。
How can I resubmit job if I'm using a Job Cluster.
从概念上讲,这与从会话集群中的保存点恢复作业没有什么不同。您可以将保存点的路径指定为集群入口点的命令行参数。详情描述 here.
How I can provide log config for Job/Session cluster?
如果您使用 Flink 二进制发行版 bin/
目录中的脚本来启动您的集群(例如 bin/start-cluster.sh
、bin/jobmanager.sh
、bin/taskmanager.sh
等.),你可以通过适配conf/log4j.properties
来改变log4j的配置。日志记录配置作为系统变量传递给 JobManager 和 TaskManager JVM(请参阅 Flink 文档中的 bin/flink-daemon.sh
). See also the Chapter "How to use logging"。
我正在研究 docker/k8s Flink 1.9.1 的部署可能性。
我在 reading/watching [1][2][3][4] 之后。
目前我们确实认为我们会尝试使用 Job Cluster 方法,尽管 我们想知道这方面的社区趋势是什么?我们宁愿 每个 Flink 集群不要部署超过一个作业。
无论如何,我想知道一些事情:
如何更改作业的每个任务管理器的任务槽数和 会话集群?在我的例子中,我在 VirtualBox 上 运行 docker 我有 4 分配给这台机器的 CPU。然而,每个任务管理器都产生了 Job Cluster 只有一个任务槽。但是,对于 Session Cluster,在 同一台机器,每个任务管理器都有 4 个任务槽。
在这两种情况下,Flink 的 UI 表明每个任务管理器有 4 个 CPU。
如果我使用的是工作集群,我该如何重新提交工作。我指的是这种用法 案例[5]。你可能会说我必须重新开始工作,但不同的是 争论。这样做的程序是什么?顺便说一句,我正在使用检查点。
我是否应该终止所有任务管理器容器并重新运行它们 参数?
如何使用 Session Cluster 重新提交作业?
如何为 Job/Session 集群提供日志配置? 我有一个案例,我在 log4j.properties 中更改了日志级别和日志格式 这在本地 (IDE) 环境中运行良好。但是当我建造 fat jar 和 运行 基于这个 jar 的作业集群它接缝了我的 log4j 属性不会传递给集群。我看到了原始格式和 原始(信息)级别。
谢谢,
[1] https://youtu.be/w721NI-mtAA
[2] https://youtu.be/WeHuTRwicSw
[3]https://ci.apache.org/projects/flink/flink-docs-stable/ops/deployment/docker.html
[4]https://github.com/apache/flink/blob/release-1.9/flink-container/docker/README.md
Currently we do think that we will try go with Job Cluster approach although we would like to know what is the community trend with this? We would rather not deploy more than one job per Flink cluster.
这个问题可能更适合用户邮件列表。
How can I change the number of task slots per task manager for Job and Session Cluster?
您可以通过配置选项控制它 taskmanager.numberOfTaskSlots
How I can resubmit job using Session Cluster?
这是描述here. The bottom line is that you create a savepoint and resume your job from it. It is also possible to resume a job from retained checkpoints。
How can I resubmit job if I'm using a Job Cluster.
从概念上讲,这与从会话集群中的保存点恢复作业没有什么不同。您可以将保存点的路径指定为集群入口点的命令行参数。详情描述 here.
How I can provide log config for Job/Session cluster?
如果您使用 Flink 二进制发行版 bin/
目录中的脚本来启动您的集群(例如 bin/start-cluster.sh
、bin/jobmanager.sh
、bin/taskmanager.sh
等.),你可以通过适配conf/log4j.properties
来改变log4j的配置。日志记录配置作为系统变量传递给 JobManager 和 TaskManager JVM(请参阅 Flink 文档中的 bin/flink-daemon.sh
). See also the Chapter "How to use logging"。