GitHub user davies opened a pull request: https://github.com/apache/spark/pull/2624
[SPARK-3762] clear reference of SparkEnv after stop SparkEnv is cached in ThreadLocal object, so after stop and create a new SparkContext, old SparkEnv is still used by some threads, it will trigger many problems, for example, pyspark will have problem after restart SparkContext, because py4j use thread pool for RPC. This patch will clear all the references after stop a SparkEnv. You can merge this pull request into a Git repository by running: $ git pull https://github.com/davies/spark env Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/2624.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2624 ---- commit 4d0ea8bf5df513d5d1f4250286ca328192018f08 Author: Davies Liu <davies....@gmail.com> Date: 2014-10-02T07:10:38Z clear reference of SparkEnv after stop ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org