Skip to content

[SPARK-15357] Cooperative spilling should check consumer memory mode#13151

Closed
davies wants to merge 4 commits intoapache:masterfrom
davies:fix_mode
Closed

[SPARK-15357] Cooperative spilling should check consumer memory mode#13151
davies wants to merge 4 commits intoapache:masterfrom
davies:fix_mode

Conversation

@davies
Copy link
Contributor

@davies davies commented May 17, 2016

What changes were proposed in this pull request?

Since we support forced spilling for Spillable, which only works in OnHeap mode, different from other SQL operators (could be OnHeap or OffHeap), we should considering the mode of consumer before calling trigger forced spilling.

How was this patch tested?

Add new test.

@davies
Copy link
Contributor Author

davies commented May 17, 2016

cc @andrewor14

@SparkQA
Copy link

SparkQA commented May 17, 2016

Test build #58710 has finished for PR 13151 at commit e08a2f5.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 17, 2016

Test build #58714 has finished for PR 13151 at commit 749f022.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 17, 2016

Test build #58719 has finished for PR 13151 at commit 3e88380.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

// Call spill() on other consumers to release memory
for (MemoryConsumer c: consumers) {
if (c != consumer && c.getUsed() > 0) {
if (c != consumer && c.getUsed() > 0 && c.getMode() == mode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

@andrewor14
Copy link
Contributor

andrewor14 commented May 18, 2016

LGTM feel free to merge it

@davies
Copy link
Contributor Author

davies commented May 18, 2016

Merging this into master and 2.0, thanks!

asfgit pushed a commit that referenced this pull request May 18, 2016
## What changes were proposed in this pull request?

Since we support forced spilling for Spillable, which only works in OnHeap mode, different from other SQL operators (could be OnHeap or OffHeap), we should considering the mode of consumer before calling trigger forced spilling.

## How was this patch tested?

Add new test.

Author: Davies Liu <davies@databricks.com>

Closes #13151 from davies/fix_mode.

(cherry picked from commit 8fb1d1c)
Signed-off-by: Davies Liu <davies.liu@gmail.com>
@asfgit asfgit closed this in 8fb1d1c May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants