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

    https://github.com/apache/spark/pull/21635#discussion_r201979140
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -309,6 +312,11 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments) extends
             finish(FinalApplicationStatus.FAILED,
               ApplicationMaster.EXIT_UNCAUGHT_EXCEPTION,
               "Uncaught exception: " + StringUtils.stringifyException(e))
    +    } finally {
    +      metricsSystem.foreach { ms =>
    +        ms.report()
    --- End diff --
    
    In case of OOM or any interrupt exception I expect [Line 
309](https://github.com/attilapiros/spark/blob/f3781bdcadb84f90cbb3402f38df9c6493fb3ad2/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala#L309)
 to catch the exception and log the error. But the exit code can be lost if 
metricSystems throws new exception so to be on the safe side I add the try 
catch to avoid this. 


---

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

Reply via email to