Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17761#discussion_r113273103
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
    @@ -84,7 +86,20 @@ private[spark] class Executor(
       }
     
       // Start worker thread pool
    -  private val threadPool = ThreadUtils.newDaemonCachedThreadPool("Executor 
task launch worker")
    +  private val threadPool = {
    +    val threadFactory = new ThreadFactoryBuilder()
    +      .setDaemon(true)
    +      .setNameFormat("Executor task launch worker-%d")
    +      .setThreadFactory(new ThreadFactory {
    +        override def newThread(r: Runnable): Thread =
    +          // Use UninterruptibleThread to run tasks so that we can allow 
running codes without being
    +          // interrupted by `Thread.interrupt()`. Some issues, such as 
KAFKA-1894, HADOOP-10622,
    +          // will hang forever if some methods are interrupted.
    +          new UninterruptibleThread(r, "unused") // thread name will be 
set by ThreadFactoryBuilder
    --- End diff --
    
    Mostly of the codes are copied from `ThreadUtils`. This one is the only 
difference that matters.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to