spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewo...@apache.org
Subject spark git commit: [SPARK-12037][CORE] initialize heartbeatReceiverRef before calling startDriverHeartbeat
Date Tue, 01 Dec 2015 01:20:01 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.6 43ffa0373 -> a4e134827


[SPARK-12037][CORE] initialize heartbeatReceiverRef before calling startDriverHeartbeat

https://issues.apache.org/jira/browse/SPARK-12037

a simple fix by changing the order of the statements

Author: CodingCat <zhunansjtu@gmail.com>

Closes #10032 from CodingCat/SPARK-12037.

(cherry picked from commit 0a46e4377216a1f7de478f220c3b3042a77789e2)
Signed-off-by: Andrew Or <andrew@databricks.com>


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

Branch: refs/heads/branch-1.6
Commit: a4e134827bdfee866a5af22751452c7e03801645
Parents: 43ffa03
Author: CodingCat <zhunansjtu@gmail.com>
Authored: Mon Nov 30 17:19:26 2015 -0800
Committer: Andrew Or <andrew@databricks.com>
Committed: Mon Nov 30 17:19:58 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/executor/Executor.scala | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a4e13482/core/src/main/scala/org/apache/spark/executor/Executor.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/executor/Executor.scala b/core/src/main/scala/org/apache/spark/executor/Executor.scala
index 6154f06..7b68dfe 100644
--- a/core/src/main/scala/org/apache/spark/executor/Executor.scala
+++ b/core/src/main/scala/org/apache/spark/executor/Executor.scala
@@ -109,6 +109,10 @@ private[spark] class Executor(
   // Executor for the heartbeat task.
   private val heartbeater = ThreadUtils.newDaemonSingleThreadScheduledExecutor("driver-heartbeater")
 
+  // must be initialized before running startDriverHeartbeat()
+  private val heartbeatReceiverRef =
+    RpcUtils.makeDriverRef(HeartbeatReceiver.ENDPOINT_NAME, conf, env.rpcEnv)
+
   startDriverHeartbeater()
 
   def launchTask(
@@ -411,9 +415,6 @@ private[spark] class Executor(
     }
   }
 
-  private val heartbeatReceiverRef =
-    RpcUtils.makeDriverRef(HeartbeatReceiver.ENDPOINT_NAME, conf, env.rpcEnv)
-
   /** Reports heartbeat and metrics for active tasks to the driver. */
   private def reportHeartBeat(): Unit = {
     // list of (task id, metrics) to send back to the driver


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message