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

    https://github.com/apache/spark/pull/2311#discussion_r17884602
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala 
---
    @@ -91,7 +94,11 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments,
             if (sc != null) {
               logInfo("Invoking sc stop from shutdown hook")
               sc.stop()
    -          finish(FinalApplicationStatus.SUCCEEDED)
    +        }
    +
    +        // Shuts down the AM.
    +        if (!finished) {
    --- End diff --
    
    @mateiz @pwendell  is there anything in spark that we can/should use  where 
we consider the application in a final state (either success or failure) such 
that we wouldn't want to retry it?    On MR there is explicit states for 
finishing and it also has checks for the committed output.   Spark I don't 
think is quite as straight forward.  Do we have any guidance on what an 
application should do on error and success?
    
    ie can we say if sc.stop() is called then it finished cleanly, or perhaps 
if System.exit(0) is called. Should we be peaking at the metrics or something 
to see if any jobs failed with the application. thoughts?


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