Skip to content

Commit a519540

Browse files
committed
[Minor][Core] Fix display wrong free memory size in the log
1 parent 1026aba commit a519540

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/storage/MemoryStore.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ private[spark] class MemoryStore(blockManager: BlockManager, memoryManager: Memo
393393
}
394394
val valuesOrBytes = if (deserialized) "values" else "bytes"
395395
logInfo("Block %s stored as %s in memory (estimated size %s, free %s)".format(
396-
blockId, valuesOrBytes, Utils.bytesToString(size), Utils.bytesToString(blocksMemoryUsed)))
396+
blockId, valuesOrBytes, Utils.bytesToString(size),
397+
Utils.bytesToString(maxMemory - blocksMemoryUsed)))
397398
} else {
398399
// Tell the block manager that we couldn't put it in memory so that it can drop it to
399400
// disk if the block allows disk storage.

0 commit comments

Comments
 (0)