igreenfield commented on a change in pull request #26624:
URL: https://github.com/apache/spark/pull/26624#discussion_r418165685



##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -674,6 +677,18 @@ private[spark] class Executor(
     }
   }
 
+  private def setMDCForTask(taskDescription: TaskDescription): Unit = {
+    val properties = taskDescription.properties
+
+    org.slf4j.MDC.put("appId", properties.getProperty("spark.app.id"))

Review comment:
       in the TaskSetManager we create:
   ```scala
   new TaskDescription(
             taskId,
             attemptNum,
             execId,
             taskName,
             index,
             task.partitionId,
             addedFiles,
             addedJars,
             task.localProperties,
             extraResources,
             serializedTask)
         }
   ```
   so we take the task.localProperties and pass it to the `TaskDescription`
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to