azagrebin commented on a change in pull request #11427: [FLINK-15790][k8s] Make
FlinkKubeClient and its implementations asynchronous
URL: https://github.com/apache/flink/pull/11427#discussion_r402289887
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -183,6 +183,14 @@
.withDescription("The user-specified annotations that are set
to the TaskManager pod. The value could be " +
"in the form of a1:v1,a2:v2");
+ public static final ConfigOption<Integer> CLIENT_ASYNC_THREAD_POOL_SIZE
=
Review comment:
Not sure whether we need to expose this, maybe thread pool with variable 1-4
threads would be good enough for all cases. If not then this option should be
in the advanced category because user has to know details of the implementation
to tune it.
Also, 2 threads may be enough by default.
Another idea, we discussed with @tillrohrmann, is to expose a general
purpose executor for this kind of async background calls in RpcEndpoint
handlers. Currently, we expose the Akka underlying dispatcher:
`RpcEndpoint#getRpcService#getExecutor`. This is not nice because this executor
cannot be really used. If we use it, we again risk to affect the `main thread`.
We can change the implementation of `RpcEndpoint#getRpcService#getExecutor` to
return another custom pool, like you create for the kube client now. As a first
step, the executor could have just from 4 up to 16 threads, also without any
config option. We could use that executor here as well. This is a separate
issue which could help for other cases as well. Then we do not need this option
`CLIENT_ASYNC_THREAD_POOL_SIZE`.
----------------------------------------------------------------
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