diff options
author | jerryshao <sshao@hortonworks.com> | 2016-06-27 09:23:58 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-06-27 09:23:58 +0100 |
commit | 52d4fe057909e8d431ae36f538dc4cafb351cdb5 (patch) | |
tree | 9b07d07df7d70411c4ef1fad602fa0e979eae1b8 | |
parent | b452026324da20f76f7d8b78e5ba1c007712e585 (diff) | |
download | spark-52d4fe057909e8d431ae36f538dc4cafb351cdb5.tar.gz spark-52d4fe057909e8d431ae36f538dc4cafb351cdb5.tar.bz2 spark-52d4fe057909e8d431ae36f538dc4cafb351cdb5.zip |
[MINOR][CORE] Fix display wrong free memory size in the log
## What changes were proposed in this pull request?
Free memory size displayed in the log is wrong (used memory), fix to make it correct.
## How was this patch tested?
N/A
Author: jerryshao <sshao@hortonworks.com>
Closes #13804 from jerryshao/memory-log-fix.
-rw-r--r-- | core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala b/core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala index 99be4de065..0349da0d8a 100644 --- a/core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala +++ b/core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala @@ -377,7 +377,8 @@ private[spark] class MemoryStore( entries.put(blockId, entry) } logInfo("Block %s stored as bytes in memory (estimated size %s, free %s)".format( - blockId, Utils.bytesToString(entry.size), Utils.bytesToString(blocksMemoryUsed))) + blockId, Utils.bytesToString(entry.size), + Utils.bytesToString(maxMemory - blocksMemoryUsed))) Right(entry.size) } else { // We ran out of space while unrolling the values for this block |