Skip to content
Snippets Groups Projects
Commit c2223e68 authored by Patrick Wendell's avatar Patrick Wendell
Browse files

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.
parent a6de90c9
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ import akka.actor._ ...@@ -22,7 +22,7 @@ import akka.actor._
import akka.pattern.ask import akka.pattern.ask
import akka.util.Duration import akka.util.Duration
import akka.util.duration._ import akka.util.duration._
import akka.pattern.AskTimeoutException import java.util.concurrent.TimeoutException
import spark.{SparkException, Logging} import spark.{SparkException, Logging}
import akka.remote.RemoteClientLifeCycleEvent import akka.remote.RemoteClientLifeCycleEvent
import akka.remote.RemoteClientShutdown import akka.remote.RemoteClientShutdown
...@@ -134,7 +134,8 @@ private[spark] class Client( ...@@ -134,7 +134,8 @@ private[spark] class Client(
val future = actor.ask(StopClient)(timeout) val future = actor.ask(StopClient)(timeout)
Await.result(future, timeout) Await.result(future, timeout)
} catch { } 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 actor = null
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment