aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-11-23 04:22:26 -0800
committerHerman van Hovell <hvanhovell@databricks.com>2016-11-23 04:22:26 -0800
commit9785ed40d7fe4e1fcd440e55706519c6e5f8d6b1 (patch)
tree63a4b337e97c28831937333579616f19415f24fb /core
parent84284e8c82542d80dad94e458a0c0210bf803db3 (diff)
downloadspark-9785ed40d7fe4e1fcd440e55706519c6e5f8d6b1.tar.gz
spark-9785ed40d7fe4e1fcd440e55706519c6e5f8d6b1.tar.bz2
spark-9785ed40d7fe4e1fcd440e55706519c6e5f8d6b1.zip
[SPARK-18557] Downgrade confusing memory leak warning message
## What changes were proposed in this pull request? TaskMemoryManager has a memory leak detector that gets called at task completion callback and checks whether any memory has not been released. If they are not released by the time the callback is invoked, TaskMemoryManager releases them. The current error message says something like the following: ``` WARN [Executor task launch worker-0] org.apache.spark.memory.TaskMemoryManager - leak 16.3 MB memory from org.apache.spark.unsafe.map.BytesToBytesMap33fb6a15 In practice, there are multiple reasons why these can be triggered in the normal code path (e.g. limit, or task failures), and the fact that these messages are log means the "leak" is fixed by TaskMemoryManager. ``` To not confuse users, this patch downgrade the message from warning to debug level, and avoids using the word "leak" since it is not actually a leak. ## How was this patch tested? N/A - this is a simple logging improvement. Author: Reynold Xin <rxin@databricks.com> Closes #15989 from rxin/SPARK-18557.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java b/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
index 1a700aa375..c40974b54c 100644
--- a/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
+++ b/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
@@ -378,14 +378,14 @@ public class TaskMemoryManager {
for (MemoryConsumer c: consumers) {
if (c != null && c.getUsed() > 0) {
// In case of failed task, it's normal to see leaked memory
- logger.warn("leak " + Utils.bytesToString(c.getUsed()) + " memory from " + c);
+ logger.debug("unreleased " + Utils.bytesToString(c.getUsed()) + " memory from " + c);
}
}
consumers.clear();
for (MemoryBlock page : pageTable) {
if (page != null) {
- logger.warn("leak a page: " + page + " in task " + taskAttemptId);
+ logger.debug("unreleased page: " + page + " in task " + taskAttemptId);
memoryManager.tungstenMemoryAllocator().free(page);
}
}