aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Ghodsi <alig@cs.berkeley.edu>2013-09-03 00:50:35 -0700
committerAli Ghodsi <alig@cs.berkeley.edu>2013-09-03 00:50:35 -0700
commitbd0788505f4ebac37a3cdf4753589deb58455c1b (patch)
tree89da8409dad423be6bef6654a5cc783dcccda313
parente452bd6d77bf1824a128599de2c3ec3663808ab6 (diff)
downloadspark-bd0788505f4ebac37a3cdf4753589deb58455c1b.tar.gz
spark-bd0788505f4ebac37a3cdf4753589deb58455c1b.tar.bz2
spark-bd0788505f4ebac37a3cdf4753589deb58455c1b.zip
Using configured akka timeouts
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/master/Master.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
index dd7dcae619..e918a33d09 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
@@ -35,7 +35,7 @@ import org.apache.spark.deploy.DeployMessages._
import org.apache.spark.deploy.master.ui.MasterWebUI
import org.apache.spark.metrics.MetricsSystem
import org.apache.spark.util.{Utils, AkkaUtils}
-import akka.util.Timeout
+import akka.util.{Duration, Timeout}
import java.util.concurrent.TimeUnit
@@ -389,9 +389,11 @@ private[spark] object Master {
def startSystemAndActor(host: String, port: Int, webUiPort: Int): (ActorSystem, Int, Int) = {
val (actorSystem, boundPort) = AkkaUtils.createActorSystem(systemName, host, port)
val actor = actorSystem.actorOf(Props(new Master(host, boundPort, webUiPort)), name = actorName)
- implicit val timeout = Timeout(5 seconds)
+ val timeoutDuration = Duration.create(
+ System.getProperty("spark.akka.askTimeout", "10").toLong, "seconds")
+ implicit val timeout = Timeout(timeoutDuration)
val respFuture = actor ? RequestWebUIPort // ask pattern
- val resp = Await.result(respFuture, timeout.duration).asInstanceOf[WebUIPortResponse]
+ val resp = Await.result(respFuture, timeoutDuration).asInstanceOf[WebUIPortResponse]
(actorSystem, boundPort, resp.webUIBoundPort)
}
}