简体   繁体   English

如何在Apache Flink的分布式运行时中管理内存?

[英]How is memory managed in distributed runtime in Apache Flink?

We are building an Apache Flink based data stream processing application in Java 8. We need to maintain a state-full list of objects which characteristics are updated every ten seconds via a source stream. 我们正在用Java 8构建基于Apache Flink的数据流处理应用程序。我们需要维护对象的完整状态列表,这些对象的特征通过源流每十秒钟更新一次。

By specs we must use, if possible, no distributed storage. 根据规范,如果可能,我们必须不使用分布式存储。 So, my question is about Flink's memory manager: in a cluster configuration, does it replicate the memory used by a task-manager? 因此,我的问题是有关Flink的内存管理器的:在集群配置中,它是否复制任务管理器使用的内存? Or is there any way to use a distributed in-memory solution with Flink? 还是有什么方法可以在Flink中使用分布式内存解决方案?

Have a look at Flink state . 看看Flink 状态 This way you can store it in flink's state which will be integrated with internal mechanisms like checkpointing/savepointing etc. 这样,您可以将其存储在flink的状态下,该状态将与内部机制集成在一起,例如检查点/保存点等。

If you need to query it externally from other services a queryable state can be a good addition. 如果您需要从其他服务从外部查询它, 可查询状态可能是一个很好的补充。

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

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