GitHub user lw-lin opened a pull request: https://github.com/apache/spark/pull/13685
[SPARK-15963][CORE] Catch `TaskKilledException` correctly in Executor.TaskRunner ## What changes were proposed in this pull request? Currently in [Executor.TaskRunner](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L362), we: ``` scala try {...} catch { case _: TaskKilledException | _: InterruptedException if task.killed => ... } ``` What we intended was: - `TaskKilledException` **OR** **(**`InterruptedException` **AND** `task.killed`**)** But fact is: - **(**`TaskKilledException` **OR** `InterruptedException`**)** **AND** `task.killed` As a consequence, sometimes we can not catch `TaskKilledException` and will incorrectly report our task status as `FAILED` (which should really be `KILLED`). This patch fixes this. ## How was this patch tested? This should be easy to reason (also we don't have any test case for TaskRunner yet?) You can merge this pull request into a Git repository by running: $ git pull https://github.com/lw-lin/spark fix-task-killed Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/13685.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #13685 ---- commit 777959e6a6b9a2e21a32aec6b0bd6850d6513474 Author: Liwei Lin <lwl...@gmail.com> Date: 2016-06-15T14:09:22Z Break the case killed and interrupted into two ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org