Skip to content

Commit

Permalink
Fix a potential deadlock in JobGenerator.stop
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Aug 20, 2015
1 parent 2f2686a commit 7a3799b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class JobGenerator(jobScheduler: JobScheduler) extends Logging {
def start(): Unit = synchronized {
if (eventLoop != null) return // generator has already been started

// Call checkpointWriter here to initialize it before eventLoop uses it to avoid a deadlock.
// See SPARK-10125
checkpointWriter

eventLoop = new EventLoop[JobGeneratorEvent]("JobGenerator") {
override protected def onReceive(event: JobGeneratorEvent): Unit = processEvent(event)

Expand Down

0 comments on commit 7a3799b

Please sign in to comment.