diff options
author | Shixiong Zhu <shixiong@databricks.com> | 2016-03-09 17:54:34 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-03-09 17:54:34 -0800 |
commit | 40e0676757c6c7ff367b6738fb42762a29657e94 (patch) | |
tree | 5671a3601bdd599c6d0805c74b1e9c5b1002e767 /core | |
parent | 37fcda3e6cf1707fb7a348a4d47231849ef8abf6 (diff) | |
download | spark-40e0676757c6c7ff367b6738fb42762a29657e94.tar.gz spark-40e0676757c6c7ff367b6738fb42762a29657e94.tar.bz2 spark-40e0676757c6c7ff367b6738fb42762a29657e94.zip |
[SPARK-13778][CORE] Set the executor state for a worker when removing it
## What changes were proposed in this pull request?
When a worker is lost, the executors on this worker are also lost. But Master's ApplicationPage still displays their states as running.
This patch just sets the executor state to `LOST` when a worker is lost.
## How was this patch tested?
manual tests
Author: Shixiong Zhu <shixiong@databricks.com>
Closes #11609 from zsxwing/SPARK-13778.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/master/Master.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala index 0f11f680b3..ff8d29fdb4 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala @@ -763,6 +763,7 @@ private[deploy] class Master( logInfo("Telling app of lost executor: " + exec.id) exec.application.driver.send(ExecutorUpdated( exec.id, ExecutorState.LOST, Some("worker lost"), None)) + exec.state = ExecutorState.LOST exec.application.removeExecutor(exec) } for (driver <- worker.drivers.values) { |