spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [3/9] git commit: SPARK-968, added sc finalize code to avoid akka rebinding to the same port
Date Mon, 23 Dec 2013 18:38:45 GMT
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 <wheeleast@gmail.com>
Authored: Mon Dec 9 09:38:58 2013 +0800
Committer: wangda.tan <wheeleast@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")
   }
 }


Mime
View raw message