aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorHong Shen <hongshen@tencent.com>2014-11-14 13:29:41 -0800
committerAndrew Or <andrew@databricks.com>2014-11-14 13:29:50 -0800
commitd579b39891f9adbabaaa2a4061042c490f94ee40 (patch)
tree9b0274b808098859e540b861da23ebe88e7c055c /core
parent3014803ead0aac31f36f4387c919174877525ff4 (diff)
downloadspark-d579b39891f9adbabaaa2a4061042c490f94ee40.tar.gz
spark-d579b39891f9adbabaaa2a4061042c490f94ee40.tar.bz2
spark-d579b39891f9adbabaaa2a4061042c490f94ee40.zip
[Spark Core] SPARK-4380 Edit spilling log from MB to B
https://issues.apache.org/jira/browse/SPARK-4380 Author: Hong Shen <hongshen@tencent.com> Closes #3243 from shenh062326/spark_change and squashes the following commits: 4653378 [Hong Shen] Edit spilling log from MB to B 21ee960 [Hong Shen] Edit spilling log from MB to B e9145e8 [Hong Shen] Edit spilling log from MB to B da761c2 [Hong Shen] Edit spilling log from MB to B 946351c [Hong Shen] Edit spilling log from MB to B (cherry picked from commit 0c56a039a9c5b871422f0fc55ff4394bc077fb34) Signed-off-by: Andrew Or <andrew@databricks.com>
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/util/collection/Spillable.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/collection/Spillable.scala b/core/src/main/scala/org/apache/spark/util/collection/Spillable.scala
index d7dccd4af8..0e4c6d633a 100644
--- a/core/src/main/scala/org/apache/spark/util/collection/Spillable.scala
+++ b/core/src/main/scala/org/apache/spark/util/collection/Spillable.scala
@@ -105,7 +105,8 @@ private[spark] trait Spillable[C] {
*/
@inline private def logSpillage(size: Long) {
val threadId = Thread.currentThread().getId
- logInfo("Thread %d spilling in-memory map of %d MB to disk (%d time%s so far)"
- .format(threadId, size / (1024 * 1024), _spillCount, if (_spillCount > 1) "s" else ""))
+ logInfo("Thread %d spilling in-memory map of %s to disk (%d time%s so far)"
+ .format(threadId, org.apache.spark.util.Utils.bytesToString(size),
+ _spillCount, if (_spillCount > 1) "s" else ""))
}
}