Skip to content

Commit 5577540

Browse files
committed
Use spark.network.timeout as the default timeout if it presents
1 parent 4f07174 commit 5577540

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

core/src/main/scala/org/apache/spark/util/RpcUtils.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ object RpcUtils {
4848

4949
/** Returns the default Spark timeout to use for RPC ask operations. */
5050
def askTimeout(conf: SparkConf): FiniteDuration = {
51-
conf.getTimeAsSeconds("spark.rpc.askTimeout", "30s") seconds
51+
conf.getTimeAsSeconds("spark.rpc.askTimeout",
52+
conf.get("spark.network.timeout", "30s")) seconds
5253
}
5354

5455
/** Returns the default Spark timeout to use for RPC remote endpoint lookup. */
5556
def lookupTimeout(conf: SparkConf): FiniteDuration = {
56-
conf.getTimeAsSeconds("spark.rpc.lookupTimeout", "30s") seconds
57+
conf.getTimeAsSeconds("spark.rpc.lookupTimeout",
58+
conf.get("spark.network.timeout", "30s")) seconds
5759
}
5860
}

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,9 @@ Apart from these, the following properties are also available, and may be useful
963963
<td>
964964
Default timeout for all network interactions. This config will be used in place of
965965
<code>spark.core.connection.ack.wait.timeout</code>, <code>spark.akka.timeout</code>,
966-
<code>spark.storage.blockManagerSlaveTimeoutMs</code> or
967-
<code>spark.shuffle.io.connectionTimeout</code>, if they are not configured.
966+
<code>spark.storage.blockManagerSlaveTimeoutMs</code>,
967+
<code>spark.shuffle.io.connectionTimeout</code>, <code>spark.rpc.askTimeout</code> or
968+
<code>spark.rpc.lookupTimeout</code> if they are not configured.
968969
</td>
969970
</tr>
970971
<tr>

0 commit comments

Comments
 (0)