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

[SPARK-6650] [core] Stop ExecutorAllocationManager when context stops. #5311

Closed
wants to merge 4 commits into from

Conversation

vanzin
Copy link
Contributor

@vanzin vanzin commented Apr 1, 2015

This fixes the thread leak. I also changed the unit test to keep track
of allocated contexts and make sure they're closed after tests are
run; this is needed since some tests use this pattern:

val sc = createContext()
doSomethingThatMayThrow()
sc.stop()

This fixes the thread leak. I also changed the unit test to keep track
of allocated contexts and making sure they're closed after tests are
run; this is needed since some tests use this pattern:

    val sc = createContext()
    doSomethingThatMayThrow()
    sc.stop()
@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29548 has started for PR 5311 at commit 9886f69.

import ExecutorAllocationManager._
import ExecutorAllocationManagerSuite._

private val contexts = new mutable.ListBuffer[SparkContext]()
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this ever have more than a single element?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. See test("verify min/max executors").

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29551 has started for PR 5311 at commit cc5a744.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29548 has finished for PR 5311 at commit 9886f69.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29548/
Test FAILed.

@vanzin
Copy link
Contributor Author

vanzin commented Apr 1, 2015

Jenkins retest this please.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29554 has started for PR 5311 at commit cc5a744.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29551 has finished for PR 5311 at commit cc5a744.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29551/
Test PASSed.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29554 has finished for PR 5311 at commit cc5a744.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29554/
Test FAILed.

@srowen
Copy link
Member

srowen commented Apr 1, 2015

I'm not sure why the test failed, but on inspection it LGTM.

@@ -17,10 +17,12 @@

package org.apache.spark

import java.util.concurrent.{TimeUnit, Executors}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: alphabetize

@sryza
Copy link
Contributor

sryza commented Apr 1, 2015

One last nit. Otherwise LGTM.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29564 has started for PR 5311 at commit 652c73b.

@SparkQA
Copy link

SparkQA commented Apr 1, 2015

Test build #29564 has finished for PR 5311 at commit 652c73b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29564/
Test PASSed.

@andrewor14
Copy link
Contributor

LGTM2, thanks for fixing this merging into master and 1.3.

@asfgit asfgit closed this in 45134ec Apr 3, 2015
asfgit pushed a commit that referenced this pull request Apr 3, 2015
This fixes the thread leak. I also changed the unit test to keep track
of allocated contexts and make sure they're closed after tests are
run; this is needed since some tests use this pattern:

    val sc = createContext()
    doSomethingThatMayThrow()
    sc.stop()

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #5311 from vanzin/SPARK-6650 and squashes the following commits:

652c73b [Marcelo Vanzin] Nits.
5711512 [Marcelo Vanzin] More exception safety.
cc5a744 [Marcelo Vanzin] Stop alloc manager before scheduler.
9886f69 [Marcelo Vanzin] [SPARK-6650] [core] Stop ExecutorAllocationManager when context stops.

(cherry picked from commit 45134ec)
Signed-off-by: Andrew Or <andrew@databricks.com>

Conflicts:
	core/src/main/scala/org/apache/spark/SparkContext.scala
@vanzin vanzin deleted the SPARK-6650 branch April 3, 2015 18:46
vanzin pushed a commit to vanzin/spark that referenced this pull request Apr 20, 2015
This fixes the thread leak. I also changed the unit test to keep track
of allocated contexts and make sure they're closed after tests are
run; this is needed since some tests use this pattern:

    val sc = createContext()
    doSomethingThatMayThrow()
    sc.stop()

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes apache#5311 from vanzin/SPARK-6650 and squashes the following commits:

652c73b [Marcelo Vanzin] Nits.
5711512 [Marcelo Vanzin] More exception safety.
cc5a744 [Marcelo Vanzin] Stop alloc manager before scheduler.
9886f69 [Marcelo Vanzin] [SPARK-6650] [core] Stop ExecutorAllocationManager when context stops.

(cherry picked from commit 45134ec)

Conflicts:
	core/src/main/scala/org/apache/spark/SparkContext.scala
sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
PRs Merged
1. [Internal] Add AppleAwsClientFactory for Mascot (apache#577)
2. Hive: Log new metadata location in commit (apache#4681)
3. change timeout to 120 for now (apache#661)
4. Internal: Add hive_catalog parameter to SparkCatalog (apache#670)
5. Internal: Pull catalog setting to CachedClientPool (apache#673)
6. Core: Defer reading Avro metadata until ManifestFile is read (apache#5206)
7. API: Fix ID assignment in schema merging (apache#5395)
8. AWS: S3OutputStream - failure to close should persist on subsequent close calls (apache#5311)
9. API: Allow schema updates to find fields with case-insensitivity (apache#5440)
10. Spark 3.3: Spark mergeSchema to respect Spark Case Sensitivity Configuration (apache#5441)
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.

6 participants