GitHub user liyinan926 opened a pull request:
https://github.com/apache/spark/pull/20460
[SPARK-23285][K8S] Allow fractional values for spark.executor.cores
## What changes were proposed in this pull request?
K8s treats CPU as a "compressible resource" and can actually assign
millicpus to individual containers, e.g., 0.1 or 100m. In
https://github.com/apache/spark/blob/master/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodFactory.scala#L94,
we already parse `spark.executor.cores` as a double value. This PR simply
bypasses the check for integral values for the property in Kubernetes mode.
## How was this patch tested?
Manual tests.
@foxish @vanzin
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liyinan926/spark-k8s master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20460.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20460
----
commit a97187016c7f0711f71da6cb5b1a66ac791e843e
Author: Yinan Li <liyinan926@...>
Date: 2018-01-31T21:29:12Z
[SPARK-23285][K8S] Allow fractional values for spark.executor.cores
K8s treats CPU as a "compressible resource" and can actually assign
millicpus to individual containers, e.g., 0.1 or 100m. In
https://github.com/apache/spark/blob/master/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodFactory.scala#L94,
we already parse `spark.executor.cores` as a double value. This PR simply
bypasses the check for integral values for the property in Kubernetes mode.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]