You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/31 13:35:30 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #10971: [FLINK-15791][kubernetes] Use explicit I/O Executor for asynchronous operations in Fabric8FlinkKubeClient

tillrohrmann commented on a change in pull request #10971: [FLINK-15791][kubernetes] Use explicit I/O Executor for asynchronous operations in Fabric8FlinkKubeClient
URL: https://github.com/apache/flink/pull/10971#discussion_r373479496
 
 

 ##########
 File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
 ##########
 @@ -81,6 +85,8 @@
 	private final List<Decorator<Deployment, KubernetesDeployment>> flinkMasterDeploymentDecorators = new ArrayList<>();
 	private final List<Decorator<Pod, KubernetesPod>> taskManagerPodDecorators = new ArrayList<>();
 
+	private final ExecutorService executorService = Executors.newFixedThreadPool(4, new ExecutorThreadFactory("Flink-KubeClient-IO"));
 
 Review comment:
   Usually, a more flexible approach is to pass in an `Executor` to the `Fabric8FlinkKubeClient`. Then an external component is responsible for the management of the executor. However, on needs to make sure that the `Fabric8FlinkKubeClient` does not live longer than the passed in `Executor`. One could then for example also write a wrapper whose responsibility is the management of the executor. This separates concerns better and it would give one the opportunity to decide whether to create a dedicated thread pool or to reuse an existing one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services