提交作业时如何设置Flink Taskmanager内存
如果我向Flink提交一份作业,并且我知道此任务所需的最大内存。
,如果我想设置Taskmangaer内存(也许Flink设置的默认存储器对我来说太大了)。
如何调整工作中的任务管理器内存?还是仅修改源代码,我才能达到目标?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有用于从Flink作业中配置任务管理人员的API。
配置任务管理器内存是启动任务管理器的一部分。如果是会话集群,则独立于提交工作。但是,在作业或应用程序集群的情况下,配置任务管理器以适合特定作业(或一组工作)是有意义的。
这通常是在群集配置(在conf/flink-conf.yaml中)中完成的,但是您还可以通过JVM参数配置任务管理器存储器。最简单的方法是设置
taskmanager.memory.flink.size
(flink本身的内存)或taskmanager.memory.memory.process.size
(flink JVM Process的内存) 。文档的一部分专门用于内存配置,并且更详细。 是本节的入口点。
尽管没有配置任务管理器的API,但作业可以指定其要求。请参阅。
There is no API for configuring task managers from within a Flink job.
Configuring task manager memory is done as part of launching the task manager. In the case of a session cluster, this is done independently from submitting a job. But in the case of a job or application cluster, it makes sense to configure the task manager(s) to fit the requirements of that specific job (or set of jobs).
This is usually done in the cluster config (in conf/flink-conf.yaml), but you can also configure task manager memory via JVM parameters. The simplest approach is to set either
taskmanager.memory.flink.size
(memory for Flink itself) ortaskmanager.memory.process.size
(memory for the Flink JVM process).There's a section of the documentation devoted to memory configuration, and it goes into much more detail. https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/memory/mem_setup/ is the entry point to this section.
While there is no API for configuring task managers, it is possible for a job to specify its requirements. See https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/finegrained_resource/.