diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-07-15 08:48:53 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-07-27 16:02:06 -0700 |
commit | c2223e68012a44e9c4bebd97dc1db772df8c597e (patch) | |
tree | 10fa5945046fe87bb2ee96dde2493940a0e968fd /core | |
parent | a6de90c927e5569e30a7bc6188253bd14c32c3a9 (diff) | |
download | spark-c2223e68012a44e9c4bebd97dc1db772df8c597e.tar.gz spark-c2223e68012a44e9c4bebd97dc1db772df8c597e.tar.bz2 spark-c2223e68012a44e9c4bebd97dc1db772df8c597e.zip |
Improve catch scope and logging for client stop()
This does two things:
1. Catches the more general `TimeoutException`, since those can be thrown.
2. Logs at info level when a timeout is detected.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/deploy/client/Client.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/scala/spark/deploy/client/Client.scala b/core/src/main/scala/spark/deploy/client/Client.scala index edefa0292d..6b038f5874 100644 --- a/core/src/main/scala/spark/deploy/client/Client.scala +++ b/core/src/main/scala/spark/deploy/client/Client.scala @@ -22,7 +22,7 @@ import akka.actor._ import akka.pattern.ask import akka.util.Duration import akka.util.duration._ -import akka.pattern.AskTimeoutException +import java.util.concurrent.TimeoutException import spark.{SparkException, Logging} import akka.remote.RemoteClientLifeCycleEvent import akka.remote.RemoteClientShutdown @@ -134,7 +134,8 @@ private[spark] class Client( val future = actor.ask(StopClient)(timeout) Await.result(future, timeout) } catch { - case e: AskTimeoutException => // Ignore it, maybe master went away + case e: TimeoutException => + logInfo("Close request to Master timed out; it may already be shut down.") } actor = null } |