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

    https://github.com/apache/spark/pull/18213#discussion_r120804119
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -229,8 +229,17 @@ private[spark] class ApplicationMaster(
             }
     
             if (!unregistered) {
    +          // Only when ApplicationMaster's exit code is 
"EXIT_REPORTER_FAILURE" or "EXIT_EARLY" or
    +          // "EXIT_UNCAUGHT_EXCEPTION" we should let RM to do reattempt. 
If the exception is from
    +          // Spark internally, for example illegal state, executor 
failure, user code bug, we
    +          // should not trigger another attempt.
    +          val shouldUnregister = !(exitCode == 
ApplicationMaster.EXIT_REPORTER_FAILURE ||
    +            exitCode == ApplicationMaster.EXIT_EARLY ||
    +            exitCode == ApplicationMaster.EXIT_UNCAUGHT_EXCEPTION)
    --- End diff --
    
    User application may exit with different exit code other than the kinds 
listed here, please see this 
[line](https://github.com/jerryshao/apache-spark/blob/1fa14152957e29d23598cb9e456ea3875138ef5e/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala#L655),
 so I think using negation may be the only option to cover that case.


---
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

Reply via email to