Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-6640

Executor may connect to HeartbeartReceiver before it's setup in the driver side

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • Spark Core
    • None

    Description

      Here is the current code about starting LocalBackend and creating HeartbeatReceiver:

        // Create and start the scheduler
        private[spark] var (schedulerBackend, taskScheduler) =
          SparkContext.createTaskScheduler(this, master)
        private val heartbeatReceiver = env.actorSystem.actorOf(
          Props(new HeartbeatReceiver(this, taskScheduler)), "HeartbeatReceiver")
      

      When creating LocalBackend, it will start `LocalActor`. `LocalActor` will create Executor, and Executor's constructor will retrieve `HeartbeatReceiver`.

      So we should make sure this line:

      private val heartbeatReceiver = env.actorSystem.actorOf(
          Props(new HeartbeatReceiver(this, taskScheduler)), "HeartbeatReceiver")
      

      happen before "creating LocalActor".

      However, current codes can not guarantee that. Sometimes, creating Executor will crash. The issue was reported by sparkdi <shopaddr1234@dubna.us> in http://apache-spark-user-list.1001560.n3.nabble.com/Actor-not-found-td22265.html#a22324

      Attachments

        Activity

          People

            zsxwing Shixiong Zhu
            zsxwing Shixiong Zhu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: