martin-g commented on code in PR #37016:
URL: https://github.com/apache/spark/pull/37016#discussion_r908444889


##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala:
##########
@@ -253,7 +253,7 @@ private[deploy] class SparkSubmitArguments(args: 
Seq[String], env: Map[String, S
         && Try(JavaUtils.byteStringAsBytes(executorMemory)).getOrElse(-1L) <= 
0) {
       error("Executor memory must be a positive number")
     }
-    if (driverCores != null && Try(driverCores.toInt).getOrElse(-1) <= 0) {
+    if (driverCores != null && Try(driverCores.toDouble.toInt).getOrElse(-1) 
<= 0) {
       error("Driver cores must be a positive number")

Review Comment:
   IMO this should be improved properly by pattern matching on the `Try` and 
printing the actual `Failure`.
   Not just for `driverCores` but for all input arguments.



-- 
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]

Reply via email to