Skip to content

Commit 828198d

Browse files
committed
Round memory bytes and convert it to Long to it’s original type. This change fixes the formatting issue in the Exception message.
1 parent 6fc3dc8 commit 828198d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ object UnifiedMemoryManager {
206206
val systemMemory = conf.getLong("spark.testing.memory", Runtime.getRuntime.maxMemory)
207207
val reservedMemory = conf.getLong("spark.testing.reservedMemory",
208208
if (conf.contains("spark.testing")) 0 else RESERVED_SYSTEM_MEMORY_BYTES)
209-
val minSystemMemory = reservedMemory * 1.5
209+
val minSystemMemory = (reservedMemory * 1.5).ceil.toLong
210210
if (systemMemory < minSystemMemory) {
211211
throw new IllegalArgumentException(s"System memory $systemMemory must " +
212212
s"be at least $minSystemMemory. Please increase heap size using the --driver-memory " +

0 commit comments

Comments
 (0)