Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2732#discussion_r19030942
--- Diff:
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
@@ -485,7 +485,20 @@ private[spark] trait ClientBase extends Logging {
* Submit an application to the ResourceManager and monitor its state.
* This continues until the application has exited for any reason.
*/
- def run(): Unit = monitorApplication(submitApplication())
+ def run(): Unit = {
+ val (yarnApplicationState, finalApplicationStatus) =
monitorApplication(submitApplication())
+ if (yarnApplicationState == YarnApplicationState.FAILED ||
+ finalApplicationStatus == FinalApplicationStatus.FAILED) {
+ throw new SparkException("Application is failed")
--- End diff --
nit: could you reword the message? Something like "Application finished
with failed status."
---
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]