alexandrutofan commented on code in PR #37016:
URL: https://github.com/apache/spark/pull/37016#discussion_r915684500
##########
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:
It's better to do that in general, but IMHO, in this case, the message is
very easy to understand, and also I'd rather keep it consistent with the other
checks..
--
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]