Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-51011][CORE] Add logging for whether a task is going to be interrupted when killed #49699

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ private[spark] object LogKeys {
case object INPUT extends LogKey
case object INPUT_SPLIT extends LogKey
case object INTEGRAL extends LogKey
case object INTERRUPT_THREAD extends LogKey
case object INTERVAL extends LogKey
case object INVALID_PARAMS extends LogKey
case object ISOLATION_LEVEL extends LogKey
Expand Down
5 changes: 3 additions & 2 deletions core/src/main/scala/org/apache/spark/executor/Executor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,9 @@ private[spark] class Executor(
@volatile var task: Task[Any] = _

def kill(interruptThread: Boolean, reason: String): Unit = {
logInfo(log"Executor is trying to kill ${LogMDC(TASK_NAME, taskName)}," +
log" reason: ${LogMDC(REASON, reason)}")
logInfo(log"Executor is trying to kill ${LogMDC(TASK_NAME, taskName)}, " +
log"interruptThread: ${LogMDC(INTERRUPT_THREAD, interruptThread)}, " +
log"reason: ${LogMDC(REASON, reason)}")
reasonIfKilled = Some(reason)
if (task != null) {
synchronized {
Expand Down