Skip to content

Commit

Permalink
[SPARK-25114][2.3][CORE][FOLLOWUP] Fix RecordBinaryComparatorSuite bu…
Browse files Browse the repository at this point in the history
…ild 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 <[email protected]>
Signed-off-by: Xiao Li <[email protected]>
  • Loading branch information
jiangxb1987 authored and gatorsmile committed Aug 21, 2018
1 parent 8bde467 commit 9cb9d72
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

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);
Expand All @@ -43,6 +45,11 @@ void free(long size) {
used -= size;
taskMemoryManager.releaseExecutionMemory(size, this);
}

public void freePage(MemoryBlock page) {
used -= page.size();
taskMemoryManager.freePage(page, this);
}
}


0 comments on commit 9cb9d72

Please sign in to comment.