[SPARK-18027][YARN] .sparkStaging not clean on RM ApplicationNotFoundException
## What changes were proposed in this pull request? Cleanup YARN staging dir on all `KILLED`/`FAILED` paths in `monitorApplication` ## How was this patch tested? Existing tests Author: Sean Owen <sowen@cloudera.com> Closes #15598 from srowen/SPARK-18027.
This commit is contained in:
parent
6c7d094ec4
commit
2978136475
|
@ -1059,9 +1059,11 @@ private[spark] class Client(
|
|||
} catch {
|
||||
case e: ApplicationNotFoundException =>
|
||||
logError(s"Application $appId not found.")
|
||||
cleanupStagingDir(appId)
|
||||
return (YarnApplicationState.KILLED, FinalApplicationStatus.KILLED)
|
||||
case NonFatal(e) =>
|
||||
logError(s"Failed to contact YARN for application $appId.", e)
|
||||
// Don't necessarily clean up staging dir because status is unknown
|
||||
return (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED)
|
||||
}
|
||||
val state = report.getYarnApplicationState
|
||||
|
|
Loading…
Reference in a new issue