attilapiros commented on a change in pull request #29090:
URL: https://github.com/apache/spark/pull/29090#discussion_r454898712



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

Review comment:
       You are right, there is no difference regarding the behaviour but 
reading the code and seeing `byteStringAsBytes` called with these configs gives 
the false impression they are in bytes. I think it is worth to change them to 
`byteStringAsMb`. 




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

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