You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2013/12/23 19:38:45 UTC

[3/9] git commit: SPARK-968, added sc finalize code to avoid akka rebinding to the same port

SPARK-968, added sc finalize code to avoid akka rebinding to the same port


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

Branch: refs/heads/master
Commit: ee68a85cff499c7aa5d448cc72a93e4de3c23c41
Parents: 850c4b7
Author: wangda.tan <wh...@gmail.com>
Authored: Mon Dec 9 09:38:58 2013 +0800
Committer: wangda.tan <wh...@gmail.com>
Committed: Mon Dec 9 09:38:58 2013 +0800

----------------------------------------------------------------------
 .../org/apache/spark/ui/jobs/JobProgressListenerSuite.scala   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/ee68a85c/core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala b/core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala
index 90a5897..861d37a 100644
--- a/core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala
@@ -85,5 +85,12 @@ class JobProgressListenerSuite extends FunSuite {
     listener.onTaskEnd(new SparkListenerTaskEnd(
       new ShuffleMapTask(0, null, null, 0, null), Success, taskInfo, taskMetrics))
     assert(listener.executorIdToSummary.getOrElse("exe-2", fail()).shuffleRead == 1000)
+
+    // do finalize
+    sc.stop()
+
+    // To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
+    System.clearProperty("spark.driver.port")
+    System.clearProperty("spark.hostPort")
   }
 }