[SPARK-19481][REPL][maven]Avoid to leak SparkContext in Signaling.cancelOnInterrupt#16825
Closed
zsxwing wants to merge 1 commit intoapache:masterfrom
zsxwing:SPARK-19481
Closed
[SPARK-19481][REPL][maven]Avoid to leak SparkContext in Signaling.cancelOnInterrupt#16825zsxwing wants to merge 1 commit intoapache:masterfrom zsxwing:SPARK-19481
zsxwing wants to merge 1 commit intoapache:masterfrom
zsxwing:SPARK-19481
Conversation
|
Test build #72472 has finished for PR 16825 at commit
|
Member
Author
|
cc @davies |
Member
Author
|
This PR doesn't fix all leaks though. I noticed that there are many Finalizers and it slows down GC. Most of them are |
davies
reviewed
Feb 9, 2017
| } else { | ||
| false | ||
| } | ||
| def cancelOnInterrupt(): Unit = SignalUtils.register("INT") { |
Contributor
There was a problem hiding this comment.
Who is using this one? Is this a breaking change?
Member
Author
There was a problem hiding this comment.
It's used by REPL to cancel the running job if any.
Contributor
|
lgtm, merging this into master and 2.1 branch, thanks |
asfgit
pushed a commit
that referenced
this pull request
Feb 9, 2017
…cancelOnInterrupt ## What changes were proposed in this pull request? `Signaling.cancelOnInterrupt` leaks a SparkContext per call and it makes ReplSuite unstable. This PR adds `SparkContext.getActive` to allow `Signaling.cancelOnInterrupt` to get the active `SparkContext` to avoid the leak. ## How was this patch tested? Jenkins Author: Shixiong Zhu <shixiong@databricks.com> Closes #16825 from zsxwing/SPARK-19481. (cherry picked from commit 303f00a) Signed-off-by: Davies Liu <davies.liu@gmail.com>
cmonkey
pushed a commit
to cmonkey/spark
that referenced
this pull request
Feb 15, 2017
…cancelOnInterrupt ## What changes were proposed in this pull request? `Signaling.cancelOnInterrupt` leaks a SparkContext per call and it makes ReplSuite unstable. This PR adds `SparkContext.getActive` to allow `Signaling.cancelOnInterrupt` to get the active `SparkContext` to avoid the leak. ## How was this patch tested? Jenkins Author: Shixiong Zhu <shixiong@databricks.com> Closes apache#16825 from zsxwing/SPARK-19481.
asfgit
pushed a commit
that referenced
this pull request
Mar 8, 2017
…cancelOnInterrupt ## What changes were proposed in this pull request? `Signaling.cancelOnInterrupt` leaks a SparkContext per call and it makes ReplSuite unstable. This PR adds `SparkContext.getActive` to allow `Signaling.cancelOnInterrupt` to get the active `SparkContext` to avoid the leak. ## How was this patch tested? Jenkins Author: Shixiong Zhu <shixiong@databricks.com> Closes #16825 from zsxwing/SPARK-19481.
Member
Author
|
Also cherry-picked to branch 2.0 as I saw ReplSuite failed several times on branch-2.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Signaling.cancelOnInterruptleaks a SparkContext per call and it makes ReplSuite unstable.This PR adds
SparkContext.getActiveto allowSignaling.cancelOnInterruptto get the activeSparkContextto avoid the leak.How was this patch tested?
Jenkins