diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java | 2 | ||||
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/collection/Spillable.scala | 3 |
2 files changed, 2 insertions, 3 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 89521c1d6c..a05a79c88d 100644 --- a/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java +++ b/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java @@ -413,7 +413,7 @@ public class TaskMemoryManager { /** * Returns Tungsten memory mode */ - public MemoryMode getTungstenMemoryMode(){ + public MemoryMode getTungstenMemoryMode() { return tungstenMemoryMode; } } 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 aee6399eb0..bdcbd22fd8 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 @@ -41,7 +41,7 @@ private[spark] abstract class Spillable[C](taskMemoryManager: TaskMemoryManager) protected def forceSpill(): Boolean // Number of elements read from input since last spill - @volatile protected def elementsRead: Long = _elementsRead + protected def elementsRead: Long = _elementsRead // Called by subclasses every time a record is read // It's used for checking spilling frequency @@ -112,7 +112,6 @@ private[spark] abstract class Spillable[C](taskMemoryManager: TaskMemoryManager) if (!isSpilled) { 0L } else { - _elementsRead = 0 val freeMemory = myMemoryThreshold - initialMemoryThreshold _memoryBytesSpilled += freeMemory releaseMemory() |