You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/29 05:20:21 UTC
[GitHub] [spark] yairogen commented on a change in pull request #28629: [SPARK-31769][CORE] Add MDC support for driver threads
yairogen commented on a change in pull request #28629:
URL: https://github.com/apache/spark/pull/28629#discussion_r446777693
##########
File path: core/src/test/scala/org/apache/spark/util/ThreadUtilsSuite.scala
##########
@@ -25,11 +25,27 @@ import scala.concurrent.duration._
import scala.util.Random
import org.scalatest.concurrent.Eventually._
+import org.slf4j.MDC
import org.apache.spark.SparkFunSuite
class ThreadUtilsSuite extends SparkFunSuite {
+ test("newDaemonSingleThreadExecutor with MDC") {
+ val appIdValue = s"appId-${System.currentTimeMillis()}"
+ MDC.put("appId", appIdValue)
Review comment:
@cloud-fan I think he is using `MDC.put` in both cases. The only difference is that for executor we also have to call `sc.setLocalProperties` in order to pass the property into the executor JVM. Once the executor process has knowledge of the appId or any other property, it is put into MDC the same way.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org