GitHub user vanzin opened a pull request: https://github.com/apache/spark/pull/14542
[SPARK-16930][yarn] Fix a couple of races in cluster app initialization. There are two narrow races that could cause the ApplicationMaster to miss when the user application instantiates the SparkContext, which could cause app failures when nothing was wrong with the app. It was also possible for a failing application to get stuck in the loop that waits for the context for a long time, instead of failing quickly. The change uses a promise to track the SparkContext instance, which gets rid of the races and allows for some simplification of the code. Tested with existing unit tests, and a new one being added to test the timeout code. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vanzin/spark SPARK-16930 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/14542.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 #14542 ---- commit 854a53d76b36402b5291fb1bf5e243c7d7fbb122 Author: Marcelo Vanzin <van...@cloudera.com> Date: 2016-08-08T17:30:05Z [SPARK-16930][yarn] Fix a couple of races in cluster app initialization. There are two narrow races that could cause the ApplicationMaster to miss when the user application instantiates the SparkContext, which could cause app failures when nothing was wrong with the app. It was also possible for a failing application to get stuck in the loop that waits for the context for a long time, instead of failing quickly. Tested with existing unit tests, and a new one being added to test the timeout code. ---- --- 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