GitHub user chtyim opened a pull request: https://github.com/apache/spark/pull/12318
[SPARK-14513][CORE] Fix threads left behind after stopping SparkContext ## What changes were proposed in this pull request? Shutting down `QueuedThreadPool` used by Jetty `Server` to avoid threads leakage after SparkContext is stopped. Note: If this fix is going to apply to the `branch-1.6`, one more patch on the `NettyRpcEnv` class is needed so that the `NettyRpcEnv._fileServer.shutdown` is called in the `NettyRpcEnv.cleanup` method. This is due to the removal of `_fileServer` field in the `NettyRpcEnv` class in the master branch. Please advice if a second PR is necessary for bring this fix back to `branch-1.6` ## How was this patch tested? Ran the ./dev/run-tests locally You can merge this pull request into a Git repository by running: $ git pull https://github.com/chtyim/spark fixes/SPARK-14513-thread-leak Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/12318.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 #12318 ---- commit cf7b296e9b56951a6c114007101e38ca79a49d13 Author: Terence Yim <tere...@cask.co> Date: 2016-04-11T22:10:51Z [SPARK-14513][CORE] Fix threads left behind after stopping SparkContext ---- --- 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