Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20807#discussion_r174965130
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -497,6 +500,8 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments) extends
             // if the user app did not create a SparkContext.
             throw new IllegalStateException("User did not initialize spark 
context!")
           }
    +      // After initialisation notify user class thread to continue
    +      synchronized { notify() }
    --- End diff --
    
    Since you have to do this in two places, I'd create a method (e.g. 
`resumeDriver`) close to where `sparkContextInitialized` is declared, so that 
it's easier to find the context of why this is needed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to