You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/04/15 14:18:56 UTC

spark git commit: [SPARK-14633] Use more readable format to show memory bytes in Error Message

Repository: spark
Updated Branches:
  refs/heads/master e24923267 -> 06b9d623e


[SPARK-14633] Use more readable format to show memory bytes in Error Message

## What changes were proposed in this pull request?

Round memory bytes and convert it to Long to it’s original type. This change fixes the formatting issue in the Exception message.

## How was this patch tested?

Manual tests were done in CDH cluster.

Author: Peter Ableda <pe...@cloudera.com>

Closes #12392 from peterableda/SPARK-14633.


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

Branch: refs/heads/master
Commit: 06b9d623e8f58d7bd450a50d938f83b4b3472a32
Parents: e249232
Author: Peter Ableda <pe...@cloudera.com>
Authored: Fri Apr 15 13:18:48 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Apr 15 13:18:48 2016 +0100

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/06b9d623/core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala b/core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala
index fa9c021..82023b5 100644
--- a/core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala
+++ b/core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala
@@ -206,7 +206,7 @@ object UnifiedMemoryManager {
     val systemMemory = conf.getLong("spark.testing.memory", Runtime.getRuntime.maxMemory)
     val reservedMemory = conf.getLong("spark.testing.reservedMemory",
       if (conf.contains("spark.testing")) 0 else RESERVED_SYSTEM_MEMORY_BYTES)
-    val minSystemMemory = reservedMemory * 1.5
+    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 " +


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