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

    https://github.com/apache/spark/pull/1056#discussion_r15560393
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
    @@ -348,4 +353,48 @@ private[spark] class Executor(
           }
         }
       }
    +
    +  def stop() {
    +    isStopped = true
    +    threadPool.shutdown()
    +  }
    +
    +  def startDriverHeartbeater() {
    +    val interval = conf.getInt("spark.executor.heartbeatInterval", 2000)
    +    val timeout = AkkaUtils.lookupTimeout(conf)
    +    val retryAttempts = AkkaUtils.numRetries(conf)
    +    val retryIntervalMs = AkkaUtils.retryWaitMs(conf)
    +    val heartbeatReceiverRef = 
AkkaUtils.makeDriverRef("HeartbeatReceiver", conf, env.actorSystem)
    +
    +    val t = new Thread() {
    --- End diff --
    
    And yes, it goes outside the scope of this PR, but one of the things that 
bugs me about the Spark code is how frequently we directly create threads with 
`new Thread` instead of with some standardized factory and perhaps with better 
defined and utilized thread pools.  


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to