Github user gaborgsomogyi commented on a diff in the pull request: https://github.com/apache/spark/pull/20807#discussion_r175156772 --- Diff: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala --- @@ -418,7 +418,19 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments) extends } private def sparkContextInitialized(sc: SparkContext) = { + // Notify runDriver function that SparkContext is available sparkContextPromise.success(sc) + // Pause the user class thread in order to make proper initialization in runDriver function. + // When it happened the thread has to be resumed with resumeDriver function. + sparkContextPromise.synchronized { --- End diff -- Fixed.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org