Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/5297#discussion_r27573380
--- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
@@ -616,17 +620,30 @@ private[spark] class Client(
* throw an appropriate SparkException.
*/
def run(): Unit = {
- val (yarnApplicationState, finalApplicationStatus) =
monitorApplication(submitApplication())
- if (yarnApplicationState == YarnApplicationState.FAILED ||
- finalApplicationStatus == FinalApplicationStatus.FAILED) {
- throw new SparkException("Application finished with failed status")
- }
- if (yarnApplicationState == YarnApplicationState.KILLED ||
- finalApplicationStatus == FinalApplicationStatus.KILLED) {
- throw new SparkException("Application is killed")
- }
- if (finalApplicationStatus == FinalApplicationStatus.UNDEFINED) {
- throw new SparkException("The final status of application is
undefined")
+ val appId = submitApplication()
+ if (fireAndForget) {
+ logInfo("... waiting before polling ResourceManager for application
state")
+ Thread.sleep(5000)
--- End diff --
I would rather see this combined with monitorapplication.
monitorapplication already supports a returnOnRunning option that I think we
can use. There is a waitForApplication in the yarnClientSchedulerBackend.
---
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]