pan3793 commented on code in PR #57332:
URL: https://github.com/apache/spark/pull/57332#discussion_r3627838091
##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStep.scala:
##########
@@ -168,7 +168,11 @@ private[spark] class BasicExecutorFeatureStep(
ENV_DRIVER_URL -> driverUrl,
ENV_EXECUTOR_CORES -> {
if
(kubernetesConf.get(KUBERNETES_ALLOCATION_RECOVERY_MODE_ENABLED).getOrElse(false))
{
- kubernetesConf.get("spark.task.cpus", "1")
+ // `spark.task.cpus` may be fractional, so round up to an
integer (at least 1).
+ // When it is 0.5 or less, the single announced core fits more
than one task and
+ // the single-task-per-recovery-executor guarantee no longer
holds;
+ // ExecutorPodsAllocator logs a warning for that case.
+ math.max(1, kubernetesConf.get("spark.task.cpus",
"1.0").toDouble.ceil.toInt).toString
Review Comment:
it's a pre-existing issue even without fractional stage-level task CPU core
support, for example, setting stage-level task CPU cores to 2 causes the same
issue.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]