bozhang2820 commented on code in PR #41121:
URL: https://github.com/apache/spark/pull/41121#discussion_r1190731684


##########
core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala:
##########
@@ -216,17 +216,21 @@ object UnifiedMemoryManager {
       if (conf.contains(IS_TESTING)) 0 else RESERVED_SYSTEM_MEMORY_BYTES)
     val minSystemMemory = (reservedMemory * 1.5).ceil.toLong
     if (systemMemory < minSystemMemory) {
-      throw new IllegalArgumentException(s"System memory $systemMemory must " +
-        s"be at least $minSystemMemory. Please increase heap size using the 
--driver-memory " +
-        s"option or ${config.DRIVER_MEMORY.key} in Spark configuration.")
+      throw new SparkIllegalArgumentException(errorClass = 
"INVALID_DRIVER_MEMORY",
+        messageParameters = Map(
+          "systemMemory" -> systemMemory.toString,
+          "minSystemMemory" -> minSystemMemory.toString,
+          "config" -> config.DRIVER_MEMORY.key))

Review Comment:
   Wrapped in the message format. Is that good enough?



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