Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.0
-
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