Skip to content

Commit

Permalink
[SPARK-22976][Core]: Cluster mode driver dir removed while running
Browse files Browse the repository at this point in the history
The clean up logic on the worker perviously determined the liveness of a
particular applicaiton based on whether or not it had running executors.
This would fail in the case that a directory was made for a driver
running in cluster mode if that driver had no running executors on the
same machine. To preserve driver directories we consider both executors
and running drivers when checking directory liveness.
  • Loading branch information
RussellSpitzer committed Jan 17, 2018
1 parent c132538 commit 38916f7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -441,7 +441,7 @@ private[deploy] class Worker(
// Spin up a separate thread (in a future) to do the dir cleanup; don't tie up worker
// rpcEndpoint.
// Copy ids so that it can be used in the cleanup thread.
val appIds = executors.values.map(_.appId).toSet
val appIds = (executors.values.map(_.appId) ++ drivers.values.map(_.driverId)).toSet
val cleanupFuture = concurrent.Future {
val appDirs = workDir.listFiles()
if (appDirs == null) {
Expand Down

0 comments on commit 38916f7

Please sign in to comment.