谢谢Cayden 我去看看

Cayden chen <[email protected]> 于2020年8月20日周四 下午4:58写道:

> hi, 你可以看下这个,讲的挺详细的&nbsp;
> https://blog.csdn.net/yuchuanchen/article/details/105677408
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "user-zh"
>                                                                     <
> [email protected]&gt;;
> 发送时间:&nbsp;2020年8月20日(星期四) 下午4:39
> 收件人:&nbsp;"user-zh"<[email protected]&gt;;
>
> 主题:&nbsp;Re: KeyedCoProcessFunction中的状态数据是否存在资源竞争的可能
>
>
>
> Hi,
>
> 问题1&amp;2 都不存在多线程的问题。Flink底层来保证这些方法都是在同一个线程串行执行的。
>
> shizk233 <[email protected]&gt; 于2020年8月20日周四 下午2:22写道:
>
> &gt; Hi all,
> &gt;
> &gt; 请教一下,KeyedCoProcessFunction比较特殊,有两个输入,对应两个ProcessElement方法。
> &gt; 问题1:
> &gt; 如果在这两个Process方法中都对同一个MapState进行修改,是否会存在资源竞争的关系?
> &gt; 还是这两个方法是顺序执行的?
> &gt;
> &gt; 问题2:
> &gt; 虽然有不同的key,但函数只有一个实例,其中的MapState应该也是一个实例,那么不同key下的
> &gt; Process过程是并发执行的还是顺序执行的,会竞争MapState资源吗?
> &gt;
>
>
> --
>
> Best,
> Benchao Li

回复