Skip to content

Commit 27203d8

Browse files
put it in a seperate case
1 parent 9d6de23 commit 27203d8

File tree

1 file changed

+4
-5
lines changed
  • yarn/src/main/scala/org/apache/spark/deploy/yarn

1 file changed

+4
-5
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -975,12 +975,11 @@ private[spark] class Client(
975975
case e: ApplicationNotFoundException =>
976976
logError(s"Application $appId not found.")
977977
return (YarnApplicationState.KILLED, FinalApplicationStatus.KILLED)
978+
case e: Exception if (e.isInstanceOf[InterruptedException]
979+
|| e.getCause.isInstanceOf[InterruptedException]) =>
980+
logInfo("The reporter thread is interrupted, we assume app is finished.")
981+
return (YarnApplicationState.FINISHED, FinalApplicationStatus.SUCCEEDED)
978982
case NonFatal(e) =>
979-
if (e.isInstanceOf[InterruptedException]
980-
|| e.getCause.isInstanceOf[InterruptedException]) {
981-
logInfo("The reporter thread is interrupted, we assume app is finished.")
982-
return (YarnApplicationState.FINISHED, FinalApplicationStatus.SUCCEEDED)
983-
}
984983
logError(s"Failed to contact YARN for application $appId.", e)
985984
return (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED)
986985
}

0 commit comments

Comments
 (0)