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:
[email protected]
With regards,
Apache Git Services