diff options
author | Kousuke Saruta <sarutak@oss.nttdata.co.jp> | 2014-11-14 22:36:56 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2014-11-14 22:37:09 -0800 |
commit | 37716b7953cd737564d5f5ffd5bac7619f94a278 (patch) | |
tree | 2faf20fae17e1ff6b4663d559b9cd61e77d24f8f | |
parent | 29a6da37257d8a165967392af6f452a404e445cd (diff) | |
download | spark-37716b7953cd737564d5f5ffd5bac7619f94a278.tar.gz spark-37716b7953cd737564d5f5ffd5bac7619f94a278.tar.bz2 spark-37716b7953cd737564d5f5ffd5bac7619f94a278.zip |
[SPARK-4260] Httpbroadcast should set connection timeout.
Httpbroadcast sets read timeout but doesn't set connection timeout.
Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>
Closes #3122 from sarutak/httpbroadcast-timeout and squashes the following commits:
c7f3a56 [Kousuke Saruta] Added Connection timeout for Http Connection to HttpBroadcast.scala
(cherry picked from commit 60969b0336930449a826821a48f83f65337e8856)
Signed-off-by: Reynold Xin <rxin@databricks.com>
-rw-r--r-- | core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala b/core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala index 7dade04273..31f0a462f8 100644 --- a/core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala +++ b/core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala @@ -191,10 +191,12 @@ private[broadcast] object HttpBroadcast extends Logging { logDebug("broadcast security enabled") val newuri = Utils.constructURIForAuthentication(new URI(url), securityManager) uc = newuri.toURL.openConnection() + uc.setConnectTimeout(httpReadTimeout) uc.setAllowUserInteraction(false) } else { logDebug("broadcast not using security") uc = new URL(url).openConnection() + uc.setConnectTimeout(httpReadTimeout) } val in = { |