Repository: spark Updated Branches: refs/heads/branch-2.3 8bde46781 -> 9cb9d7201
[SPARK-25114][2.3][CORE][FOLLOWUP] Fix RecordBinaryComparatorSuite build failure ## What changes were proposed in this pull request? Fix RecordBinaryComparatorSuite build failure ## How was this patch tested? Existing tests. Closes #22166 from jiangxb1987/SPARK-25114-2.3. Authored-by: Xingbo Jiang <xingbo.ji...@databricks.com> Signed-off-by: Xiao Li <gatorsm...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/9cb9d720 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/9cb9d720 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/9cb9d720 Branch: refs/heads/branch-2.3 Commit: 9cb9d7201acbef6dfc1c9fe0cfd39fd9d89cac76 Parents: 8bde467 Author: Xingbo Jiang <xingbo.ji...@databricks.com> Authored: Tue Aug 21 09:45:19 2018 -0700 Committer: Xiao Li <gatorsm...@gmail.com> Committed: Tue Aug 21 09:45:19 2018 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/spark/memory/TestMemoryConsumer.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/9cb9d720/core/src/test/java/org/apache/spark/memory/TestMemoryConsumer.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/spark/memory/TestMemoryConsumer.java b/core/src/test/java/org/apache/spark/memory/TestMemoryConsumer.java index db91329..1b7739c 100644 --- a/core/src/test/java/org/apache/spark/memory/TestMemoryConsumer.java +++ b/core/src/test/java/org/apache/spark/memory/TestMemoryConsumer.java @@ -19,6 +19,8 @@ package org.apache.spark.memory; import java.io.IOException; +import org.apache.spark.unsafe.memory.MemoryBlock; + public class TestMemoryConsumer extends MemoryConsumer { public TestMemoryConsumer(TaskMemoryManager memoryManager, MemoryMode mode) { super(memoryManager, 1024L, mode); @@ -43,6 +45,11 @@ public class TestMemoryConsumer extends MemoryConsumer { used -= size; taskMemoryManager.releaseExecutionMemory(size, this); } + + public void freePage(MemoryBlock page) { + used -= page.size(); + taskMemoryManager.freePage(page, this); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org