Repository: spark
Updated Branches:
  refs/heads/master b45202632 -> 52d4fe057


[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 <ss...@hortonworks.com>

Closes #13804 from jerryshao/memory-log-fix.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/52d4fe05
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/52d4fe05
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/52d4fe05

Branch: refs/heads/master
Commit: 52d4fe057909e8d431ae36f538dc4cafb351cdb5
Parents: b452026
Author: jerryshao <ss...@hortonworks.com>
Authored: Mon Jun 27 09:23:58 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Mon Jun 27 09:23:58 2016 +0100

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/storage/memory/MemoryStore.scala  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/52d4fe05/core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala
----------------------------------------------------------------------
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 99be4de..0349da0 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to