You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2026/02/28 17:03:00 UTC
[jira] [Created] (SPARK-55757) Improve `spark.task.cpus` validation
Dongjoon Hyun created SPARK-55757:
-------------------------------------
Summary: Improve `spark.task.cpus` validation
Key: SPARK-55757
URL: https://issues.apache.org/jira/browse/SPARK-55757
Project: Spark
Issue Type: Sub-task
Components: Spark Core
Affects Versions: 4.2.0
Reporter: Dongjoon Hyun
Currently, Apache Spark throws `java.lang.ArithmeticException` for the invalid `spark.task.cpus`. We had better improve it.
{code}
$ bin/spark-shell -c spark.task.cpus=0
...
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 4.2.0-preview2
/_/
...
26/02/28 09:00:56 ERROR SparkContext: Error initializing SparkContext.
java.lang.ArithmeticException: / by zero
at org.apache.spark.resource.ResourceUtils$.warnOnWastedResources(ResourceUtils.scala:444)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org