You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Nico <ni...@gmail.com> on 2017/03/31 10:17:53 UTC

AsyncFunction and Parallelism

Hi,

I have a short question regarding the AsyncFunction of Flink 1.2.0. In the
documentation it says:

"[...] that the AsyncFunction is not called in a multi-threaded fashion.
There exists only one instance of the AsyncFunction and it is called
sequentially for each record in the respective partition of the stream."

Does it mean the there is only subtask of the Operator, so the parallelism
is always 1 for this Operator?

Thank you :)

Best,
Nico

Re: AsyncFunction and Parallelism

Posted by Nico <ni...@gmail.com>.
Hi Kostas,

thank you very much for the fast response. This is what I thought, but now
I have clarity :) Thanks a lot.

Best,
Nico

2017-03-31 12:23 GMT+02:00 Kostas Kloudas <k....@data-artisans.com>:

> Hi Nico,
>
> No, you can have as many parallel tasks doing async IO operations as you
> want.
> What the documentation says is that in each one of these tasks, there is
> one thread handling
> the requests.
>
> Hope this helps,
> Kostas
>
> On Mar 31, 2017, at 12:17 PM, Nico <ni...@gmail.com> wrote:
>
> Hi,
>
> I have a short question regarding the AsyncFunction of Flink 1.2.0. In the
> documentation it says:
>
> "[...] that the AsyncFunction is not called in a multi-threaded fashion.
> There exists only one instance of the AsyncFunction and it is called
> sequentially for each record in the respective partition of the stream."
>
> Does it mean the there is only subtask of the Operator, so the parallelism
> is always 1 for this Operator?
>
> Thank you :)
>
> Best,
> Nico
>
>
>

Re: AsyncFunction and Parallelism

Posted by Kostas Kloudas <k....@data-artisans.com>.
Hi Nico,

No, you can have as many parallel tasks doing async IO operations as you want.
What the documentation says is that in each one of these tasks, there is one thread handling 
the requests.

Hope this helps,
Kostas 

> On Mar 31, 2017, at 12:17 PM, Nico <ni...@gmail.com> wrote:
> 
> Hi,
> 
> I have a short question regarding the AsyncFunction of Flink 1.2.0. In the documentation it says:
> 
> "[...] that the AsyncFunction is not called in a multi-threaded fashion. There exists only one instance of the AsyncFunction and it is called sequentially for each record in the respective partition of the stream."
> 
> Does it mean the there is only subtask of the Operator, so the parallelism is always 1 for this Operator? 
> 
> Thank you :)
> 
> Best,
> Nico