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

    https://github.com/apache/spark/pull/5297#discussion_r27711240
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -616,17 +620,29 @@ private[spark] class Client(
        * throw an appropriate SparkException.
        */
       def run(): Unit = {
    -    val (yarnApplicationState, finalApplicationStatus) = 
monitorApplication(submitApplication())
    -    if (yarnApplicationState == YarnApplicationState.FAILED ||
    -      finalApplicationStatus == FinalApplicationStatus.FAILED) {
    -      throw new SparkException("Application finished with failed status")
    -    }
    -    if (yarnApplicationState == YarnApplicationState.KILLED ||
    -      finalApplicationStatus == FinalApplicationStatus.KILLED) {
    -      throw new SparkException("Application is killed")
    -    }
    -    if (finalApplicationStatus == FinalApplicationStatus.UNDEFINED) {
    -      throw new SparkException("The final status of application is 
undefined")
    +    val appId = submitApplication()
    +    if (fireAndForget) {
    +      logInfo("... polling ResourceManager for application state")
    --- End diff --
    
    If take a look back at @tgravescs 's comments, you will find out that he 
make same propose before. The problem is using `monitorApplication(appId, 
returnOnRunning = true)` doesn't totally equal to what `fire-and-forget` means.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to