azagrebin commented on a change in pull request #11110: [FLINK-16111][k8s] Fix
Kubernetes deployment not respecting 'taskmanager.cpu.cores'.
URL: https://github.com/apache/flink/pull/11110#discussion_r383734545
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManager.java
##########
@@ -338,6 +339,6 @@ protected FlinkKubeClient createFlinkKubeClient() {
@Override
protected double getCpuCores(Configuration configuration) {
- return
flinkConfig.getDouble(KubernetesConfigOptions.TASK_MANAGER_CPU,
numSlotsPerTaskManager);
+ return
TaskExecutorProcessUtils.getCpuCoresWithFallbackConfigOption(configuration,
KubernetesConfigOptions.TASK_MANAGER_CPU);
Review comment:
weird that `ActiveResourceManager#getCpuCores` returns double, though we
need `CPUResource` which is in general returned from `getCpuCoresWithFallback`.
we need int rewrapping only in yarn.
This could also eliminate
`TaskExecutorProcessSpecBuilder#withCpuCores(double cpuCores)`.
----------------------------------------------------------------
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