You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Soumya Simanta <so...@gmail.com> on 2016/06/08 05:14:15 UTC

Dedicated ExecutionContext inside Flink

What is the recommended practice for using a dedicated ExecutionContexts
inside Flink code?

We are making some external network calls using Futures. Currently all of
them are running on the global execution context (import
scala.concurrent.ExecutionContext.Implicits.global).

Thanks
-Soumya

Re: Dedicated ExecutionContext inside Flink

Posted by Till Rohrmann <tr...@apache.org>.
Hi Soumya,

except for the LocalFlinkMiniCluster, which is used by the LocalEnvironment
to execute Flink programs in your IDE, we don't use the global
ExecutionContext. Thus, it should be fine to use the global
ExecutionContext for your futures without affecting Flink.

However, I would recommend to create a dedicated ExecutionContext to you.
That way, you've better control over the resource consumption of the
different parts of your code. You could, for example, create an
ExecutionContext for a subtask of an operator in the open method of the
RichFunction.

Cheers,
Till

On Wed, Jun 8, 2016 at 7:14 AM, Soumya Simanta <so...@gmail.com>
wrote:

> What is the recommended practice for using a dedicated ExecutionContexts
> inside Flink code?
>
> We are making some external network calls using Futures. Currently all of
> them are running on the global execution context (import
> scala.concurrent.ExecutionContext.Implicits.global).
>
> Thanks
> -Soumya
>
>
>
>
>