Dedicated ExecutionContext inside Flink

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dedicated ExecutionContext inside Flink

Soumya Simanta
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



Reply | Threaded
Open this post in threaded view
|

Re: Dedicated ExecutionContext inside Flink

Till Rohrmann
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 <[hidden email]> 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