@@ -108,7 +108,7 @@ private[spark] class Executor(
108108 .setNameFormat(" Executor task launch worker-%d" )
109109 .setThreadFactory((r : Runnable ) => new UninterruptibleThread (r, " unused" ))
110110 .build()
111- ThreadUtils .newCachedThreadPool(threadFactory)
111+ Executors .newCachedThreadPool(threadFactory). asInstanceOf [ ThreadPoolExecutor ]
112112 }
113113 private val executorSource = new ExecutorSource (threadPool, executorId)
114114 // Pool used for threads that supervise task killing / cancellation
@@ -326,7 +326,7 @@ private[spark] class Executor(
326326 .filter(_._1.startsWith(" mdc." )).map { item =>
327327 val key = item._1.substring(4 )
328328 (key, item._2)
329- }.toMap
329+ }.toSeq
330330
331331 /** If specified, this task has been killed and this option contains the reason. */
332332 @ volatile private var reasonIfKilled : Option [String ] = None
@@ -402,7 +402,7 @@ private[spark] class Executor(
402402
403403 override def run (): Unit = {
404404
405- setMDCForTask(taskDescription.name , mdcProperties)
405+ setMDCForTask(taskName , mdcProperties)
406406
407407 threadId = Thread .currentThread.getId
408408 Thread .currentThread.setName(threadName)
@@ -702,7 +702,7 @@ private[spark] class Executor(
702702 }
703703 }
704704
705- private def setMDCForTask (taskName : String , mdc : scala.collection. Map [ String , String ]): Unit = {
705+ private def setMDCForTask (taskName : String , mdc : Seq [( String , String ) ]): Unit = {
706706 MDC .put(" taskName" , taskName)
707707
708708 mdc.foreach { case (key, value) =>
0 commit comments