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

    https://github.com/apache/spark/pull/2577#discussion_r18459205
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala 
---
    @@ -383,40 +405,82 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments,
         }
       }
     
    +  /**
    +   * This system security manager applies to the entire process.
    +   * It's main purpose is to handle the case if the user code does a 
System.exit.
    +   * This allows us to catch that and properly set the YARN application 
status and
    +   * cleanup if needed.
    +   */
    +  private def setupSystemSecurityManager() = {
    +    try {
    +      var stopped = false
    +      System.setSecurityManager(new java.lang.SecurityManager() {
    +        override def checkExit(paramInt: Int) {
    +          if (!stopped) {
    +            logInfo("In securityManager checkExit, exit code: " + paramInt)
    +            if (paramInt == 0) {
    +              finish(FinalApplicationStatus.SUCCEEDED, 
ApplicationMaster.EXIT_SUCCESS)
    +            } else {
    +              finish(FinalApplicationStatus.FAILED,
    +                paramInt,
    +                "User class exited with non-zero exit code")
    +            }
    +            stopped = true
    +          }
    +        }
    +        // required for the checkExit to work properly
    +        override def checkPermission(perm: java.security.Permission): Unit 
= {
    +        }
    --- End diff --
    
    In the future please clarify what you want bumped up as you said this prior 
and I thought you meant remove the extra space between 430 and 431.  I assume 
you actually mean the }


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