Skip to content

Commit 746b661

Browse files
author
Marcelo Vanzin
committed
Fix borked merge.
1 parent 80fc00e commit 746b661

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/src/main/scala/org/apache/spark/executor/Executor.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,18 +435,17 @@ private[spark] class Executor(
435435
}
436436

437437
/**
438-
* Starts a thread to report heartbeat and partial metrics for active tasks to driver.
439-
* This thread stops running when the executor is stopped.
438+
* Schedules a task to report heartbeat and partial metrics for active tasks to driver.
440439
*/
441440
private def startDriverHeartbeater(): Unit = {
442441
val intervalMs = conf.getTimeAsMs("spark.executor.heartbeatInterval", "10s")
443442

444443
// Wait a random interval so the heartbeats don't end up in sync
445-
val initialDelay = interval + (math.random * interval).asInstanceOf[Int]
444+
val initialDelay = intervalMs + (math.random * intervalMs).asInstanceOf[Int]
446445

447446
val heartbeatTask = new Runnable() {
448447
override def run(): Unit = Utils.logUncaughtExceptions(reportHeartBeat())
449448
}
450-
heartbeater.scheduleAtFixedRate(heartbeatTask, initialDelay, interval, TimeUnit.MILLISECONDS)
449+
heartbeater.scheduleAtFixedRate(heartbeatTask, initialDelay, intervalMs, TimeUnit.MILLISECONDS)
451450
}
452451
}

0 commit comments

Comments
 (0)