Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
put it in a seperate case
  • Loading branch information
WangTaoTheTonic committed Mar 14, 2016
commit 27203d8a5d6a8a5ee8431a34d9e48aa0c6a15157
9 changes: 4 additions & 5 deletions yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
Original file line number Diff line number Diff line change
Expand Up @@ -975,12 +975,11 @@ private[spark] class Client(
case e: ApplicationNotFoundException =>
logError(s"Application $appId not found.")
return (YarnApplicationState.KILLED, FinalApplicationStatus.KILLED)
case e: Exception if (e.isInstanceOf[InterruptedException]
|| e.getCause.isInstanceOf[InterruptedException]) =>
logInfo("The reporter thread is interrupted, we assume app is finished.")
return (YarnApplicationState.FINISHED, FinalApplicationStatus.SUCCEEDED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we change the status to be UNDEFINED.

Since we really don't know the status it seems like returning the undefined in this case make more sense. Hopefully the user would then go look more at the RM or spark job details.

case NonFatal(e) =>
if (e.isInstanceOf[InterruptedException]
|| e.getCause.isInstanceOf[InterruptedException]) {
logInfo("The reporter thread is interrupted, we assume app is finished.")
return (YarnApplicationState.FINISHED, FinalApplicationStatus.SUCCEEDED)
}
logError(s"Failed to contact YARN for application $appId.", e)
return (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED)
}
Expand Down