Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STREAMING][TEST] Fix flaky streaming.FailureSuite #11166

Closed
wants to merge 1 commit into from

Conversation

tdas
Copy link
Contributor

@tdas tdas commented Feb 11, 2016

Under some corner cases, the test suite failed to shutdown the SparkContext causing cascaded failures. This fix does two things

  • Makes sure no SparkContext is active after every test
  • Makes sure StreamingContext is always shutdown (prevents leaking of StreamingContexts as well, just in case)

@tdas
Copy link
Contributor Author

tdas commented Feb 11, 2016

@zsxwing Could you take a look at this.

@@ -43,6 +43,9 @@ class FailureSuite extends SparkFunSuite with BeforeAndAfter with Logging {
Utils.deleteRecursively(directory)
}
StreamingContext.getActive().foreach { _.stop() }

// Stop SparkContext if active
SparkContext.getOrCreate(new SparkConf().setMaster("local").setAppName("bla")).stop()
Copy link
Member

Choose a reason for hiding this comment

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

could you explain where leaks SparkContext? I cannot find any clue from the log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not entirely sure. I think somehow a StreamingContext is not shutdown cleanly, which causes the SparkContext to leak. This fix at least prevents the issue to cascade to other testsuites.

@SparkQA
Copy link

SparkQA commented Feb 11, 2016

Test build #51079 has finished for PR 11166 at commit abaabb9.

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

@zsxwing
Copy link
Member

zsxwing commented Feb 11, 2016

LGTM. Merging to master

@asfgit asfgit closed this in 219a74a Feb 11, 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
3 participants