aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDavies Liu <davies@databricks.com>2016-03-21 11:21:39 -0700
committerDavies Liu <davies.liu@gmail.com>2016-03-21 11:21:39 -0700
commit9b4e15ba13f62cff302d978093633fc3181a8475 (patch)
tree28b8babd93248e32ea6df86946418b8045710a4b /core
parent5d8de16e715497e9d3b5306abc5bbc45402e9b43 (diff)
downloadspark-9b4e15ba13f62cff302d978093633fc3181a8475.tar.gz
spark-9b4e15ba13f62cff302d978093633fc3181a8475.tar.bz2
spark-9b4e15ba13f62cff302d978093633fc3181a8475.zip
[SPARK-14007] [SQL] Manage the memory used by hash map in shuffled hash join
## What changes were proposed in this pull request? This PR try acquire the memory for hash map in shuffled hash join, fail the task if there is no enough memory (otherwise it could OOM the executor). It also removed unused HashedRelation. ## How was this patch tested? Existing unit tests. Manual tests with TPCDS Q78. Author: Davies Liu <davies@databricks.com> Closes #11826 from davies/cleanup_hash2.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java2
1 files changed, 1 insertions, 1 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 18612dd68c..9044bb4f4a 100644
--- a/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
+++ b/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
@@ -268,8 +268,8 @@ public class TaskMemoryManager {
logger.warn("Failed to allocate a page ({} bytes), try again.", acquired);
// there is no enough memory actually, it means the actual free memory is smaller than
// MemoryManager thought, we should keep the acquired memory.
- acquiredButNotUsed += acquired;
synchronized (this) {
+ acquiredButNotUsed += acquired;
allocatedPages.clear(pageNumber);
}
// this could trigger spilling to free some pages.