Skip to content

Commit f71e8da

Browse files
xueyumusiczsxwing
authored andcommitted
[SPARK-24566][CORE] Fix spark.storage.blockManagerSlaveTimeoutMs default config
This PR use spark.network.timeout in place of spark.storage.blockManagerSlaveTimeoutMs when it is not configured, as configuration doc said manual test Author: xueyu <[email protected]> Closes #21575 from xueyumusic/slaveTimeOutConfig.
1 parent f6e6899 commit f71e8da

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ private[spark] class HeartbeatReceiver(sc: SparkContext, clock: Clock)
7474

7575
// "spark.network.timeout" uses "seconds", while `spark.storage.blockManagerSlaveTimeoutMs` uses
7676
// "milliseconds"
77-
private val slaveTimeoutMs =
78-
sc.conf.getTimeAsMs("spark.storage.blockManagerSlaveTimeoutMs", "120s")
7977
private val executorTimeoutMs =
80-
sc.conf.getTimeAsSeconds("spark.network.timeout", s"${slaveTimeoutMs}ms") * 1000
78+
sc.conf.getTimeAsMs("spark.storage.blockManagerSlaveTimeoutMs",
79+
s"${sc.conf.getTimeAsSeconds("spark.network.timeout", "120s")}s")
8180

8281
// "spark.network.timeoutInterval" uses "seconds", while
8382
// "spark.storage.blockManagerTimeoutIntervalMs" uses "milliseconds"

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
634634
slave.hostname,
635635
externalShufflePort,
636636
sc.conf.getTimeAsMs("spark.storage.blockManagerSlaveTimeoutMs",
637-
s"${sc.conf.getTimeAsSeconds("spark.network.timeout", "120s") * 1000L}ms"),
637+
s"${sc.conf.getTimeAsSeconds("spark.network.timeout", "120s")}s"),
638638
sc.conf.getTimeAsMs("spark.executor.heartbeatInterval", "10s"))
639639
slave.shuffleRegistered = true
640640
}

0 commit comments

Comments
 (0)