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

    https://github.com/apache/spark/pull/18213#discussion_r121039957
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -744,9 +746,23 @@ object ApplicationMaster extends Logging {
       private val EXIT_SECURITY = 14
       private val EXIT_EXCEPTION_USER_CLASS = 15
       private val EXIT_EARLY = 16
    +  private val EXIT_EXCEPTION_USER_APP = 17
     
       private var master: ApplicationMaster = _
     
    +  def shouldUnregister(exitCode: Int): Boolean = {
    +    // 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.
    +    exitCode == EXIT_SUCCESS ||
    --- End diff --
    
    Good idea, let me change the 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

Reply via email to