Skip to content

Commit ccd5147

Browse files
committed
Fix wrong parsing logic of executorTimeoutMs and checkTimeoutIntervalMs in HeartbeatReceiver
1 parent c14ddd9 commit ccd5147

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/src/main/scala/org/apache/spark/HeartbeatReceiver.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ private[spark] class HeartbeatReceiver(sc: SparkContext, scheduler: TaskSchedule
4949

5050
// executor ID -> timestamp of when the last heartbeat from this executor was received
5151
private val executorLastSeen = new mutable.HashMap[String, Long]
52-
53-
private val executorTimeoutMs = sc.conf.getLong("spark.network.timeout",
54-
sc.conf.getLong("spark.storage.blockManagerSlaveTimeoutMs", 120)) * 1000
55-
56-
private val checkTimeoutIntervalMs = sc.conf.getLong("spark.network.timeoutInterval",
57-
sc.conf.getLong("spark.storage.blockManagerTimeoutIntervalMs", 60)) * 1000
52+
53+
private val executorTimeoutMs = sc.conf.getOption("spark.network.timeout").map(_.toLong * 1000).
54+
getOrElse(sc.conf.getLong("spark.storage.blockManagerSlaveTimeoutMs", 120000))
55+
56+
private val checkTimeoutIntervalMs =
57+
sc.conf.getOption("spark.network.timeoutInterval").map(_.toLong * 1000).
58+
getOrElse(sc.conf.getLong("spark.storage.blockManagerTimeoutIntervalMs", 60000))
5859

5960
private var timeoutCheckingTask: Cancellable = null
6061

0 commit comments

Comments
 (0)