You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2013/12/14 09:42:30 UTC

[46/50] [abbrv] git commit: Added a comment about ActorRef and ActorSelection difference.

Added a comment about ActorRef and ActorSelection difference.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/1ae3c0fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/1ae3c0fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/1ae3c0fc

Branch: refs/heads/master
Commit: 1ae3c0fc5e0273319d0e9497268a4c9854aae2e0
Parents: 76566b1
Author: Prashant Sharma <sc...@gmail.com>
Authored: Sat Dec 14 10:44:24 2013 +0530
Committer: Prashant Sharma <sc...@gmail.com>
Committed: Sat Dec 14 10:44:24 2013 +0530

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/MapOutputTracker.scala | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/1ae3c0fc/core/src/main/scala/org/apache/spark/MapOutputTracker.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/MapOutputTracker.scala b/core/src/main/scala/org/apache/spark/MapOutputTracker.scala
index fbda11f..10fae5a 100644
--- a/core/src/main/scala/org/apache/spark/MapOutputTracker.scala
+++ b/core/src/main/scala/org/apache/spark/MapOutputTracker.scala
@@ -72,6 +72,13 @@ private[spark] class MapOutputTracker extends Logging {
   // throw a SparkException if this fails.
   private def askTracker(message: Any): Any = {
     try {
+      /*
+        The difference between ActorRef and ActorSelection is well explained here:
+        http://doc.akka.io/docs/akka/2.2.3/project/migration-guide-2.1.x-2.2.x.html#Use_actorSelection_instead_of_actorFor
+        In spark a map output tracker can be either started on Driver where it is created which
+        is an ActorRef or it can be on executor from where it is looked up which is an
+        actorSelection.
+       */
       val future = trackerActor match {
         case Left(a: ActorRef) => a.ask(message)(timeout)
         case Right(b: ActorSelection) => b.ask(message)(timeout)