Hi Flink 原生提供了 State 接口,像 zhisheng 说的,可以使用 ValueState, ListState, MapState。但是所有的 State 都能在 Operator 内部访问,也就是说不能跨 Operator 访问。如果你现在存在 Redis 中的数据需要在不同的 Operator 中访问的话,Value/List/MapState 都不能满足需求。不过你可以尝试看看 BroadcastState[1] 是否满足你的需求。 [1] https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/state/broadcast_state.html Best, Congxian
zhisheng <[email protected]> 于2020年1月20日周一 下午3:34写道: > 可以使用 ValueState、ListState、MapState 等存储 > > sun <[email protected]> 于2020年1月16日周四 下午5:56写道: > > > > > > 以前我们使用flink的时候,用到了redis,将redis作为缓存的中间件,存放一些缓存的数据,好像flink可以把这些缓存的数据放在flink内存里面,请问怎么使用flink内存来替代redis >
