Skip to content

Commit 3107aeb

Browse files
committed
address Aaron's comments
1 parent eb615ba commit 3107aeb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,15 @@ private[spark] class ExecutorRunner(
6868
}
6969

7070
private def killProcess() {
71-
if (process != null) {
72-
logInfo("Killing process!")
73-
process.destroy()
74-
process.waitFor()
75-
process = null
76-
}
71+
logInfo("Killing process!")
72+
process.destroy()
73+
process.waitFor()
7774
}
7875

7976
/** Stop this executor runner, including killing the process it launched */
8077
def kill() {
8178
if (workerThread != null) {
79+
// the workerThread will kill the child process when interrupted
8280
workerThread.interrupt()
8381
workerThread = null
8482
state = ExecutorState.KILLED

0 commit comments

Comments
 (0)