diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-01-07 21:56:35 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-01-07 21:56:35 -0800 |
commit | f5f12dc28218f3ed89836434ab0530e88b043e47 (patch) | |
tree | 3b49f71c84d294c6c342d899fe01d48ce5ce39c5 /bin/run-example | |
parent | 11891e68c32d1078ed16c65cca23e28a1f171bb7 (diff) | |
parent | eb24684748da5dc2495fc4afe6da58edb463294b (diff) | |
download | spark-f5f12dc28218f3ed89836434ab0530e88b043e47.tar.gz spark-f5f12dc28218f3ed89836434ab0530e88b043e47.tar.bz2 spark-f5f12dc28218f3ed89836434ab0530e88b043e47.zip |
Merge pull request #336 from liancheng/akka-remote-lookup
Get rid of `Either[ActorRef, ActorSelection]'
In this pull request, instead of returning an `Either[ActorRef, ActorSelection]`, `registerOrLookup` identifies the remote actor blockingly to obtain an `ActorRef`, or throws an exception if the remote actor doesn't exist or the lookup times out (configured by `spark.akka.lookupTimeout`). This function is only called when an `SparkEnv` is constructed (instantiating driver or executor), so the blocking call is considered acceptable. Executor side `ActorSelection`s/`ActorRef`s to driver side `MapOutputTrackerMasterActor` and `BlockManagerMasterActor` are affected by this pull request.
`ActorSelection` is dangerous and should be used with care. It's only absolutely safe to send messages via an `ActorSelection` when the remote actor is stateless, so that actor incarnation is irrelevant. But as pointed by @ScrapCodes in the comments below, executor exits immediately once the connection to the driver lost, `ActorSelection`s are not harmful in this scenario. So this pull request is mostly a code style patch.
Diffstat (limited to 'bin/run-example')
0 files changed, 0 insertions, 0 deletions