Skip to content

Commit d579b39

Browse files
shenh062326Andrew Or
authored and
Andrew Or
committed
[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 0c56a03) Signed-off-by: Andrew Or <andrew@databricks.com>
1 parent 3014803 commit d579b39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/scala/org/apache/spark/util/collection/Spillable.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ private[spark] trait Spillable[C] {
105105
*/
106106
@inline private def logSpillage(size: Long) {
107107
val threadId = Thread.currentThread().getId
108-
logInfo("Thread %d spilling in-memory map of %d MB to disk (%d time%s so far)"
109-
.format(threadId, size / (1024 * 1024), _spillCount, if (_spillCount > 1) "s" else ""))
108+
logInfo("Thread %d spilling in-memory map of %s to disk (%d time%s so far)"
109+
.format(threadId, org.apache.spark.util.Utils.bytesToString(size),
110+
_spillCount, if (_spillCount > 1) "s" else ""))
110111
}
111112
}

0 commit comments

Comments
 (0)