aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRui Li <rui.li@intel.com>2014-07-23 16:23:24 -0700
committerMatei Zaharia <matei@databricks.com>2014-07-23 16:23:24 -0700
commit91903e0a50b0efb7217610021a628b3043004d82 (patch)
tree3373b62e8d79a6ce618fa16fe2075b73f640628b /core
parent1b790cf7755cace0d89ac5777717e6df3be7356f (diff)
downloadspark-91903e0a50b0efb7217610021a628b3043004d82.tar.gz
spark-91903e0a50b0efb7217610021a628b3043004d82.tar.bz2
spark-91903e0a50b0efb7217610021a628b3043004d82.zip
SPARK-2277: clear host->rack info properly
Hi mridulm, I just think of this issue of [#1212](https://github.com/apache/spark/pull/1212): I added FakeRackUtil to hold the host -> rack mapping. It should be cleaned up after use so that it won't mess up with test cases others may add later. Really sorry about this. Author: Rui Li <rui.li@intel.com> Closes #1454 from lirui-intel/SPARK-2277-fix-UT and squashes the following commits: f8ea25c [Rui Li] SPARK-2277: clear host->rack info properly
Diffstat (limited to 'core')
-rw-r--r--core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
index 86b443b18f..c52368b551 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
@@ -475,6 +475,7 @@ class TaskSetManagerSuite extends FunSuite with LocalSparkContext with Logging {
// Valid locality should contain PROCESS_LOCAL, NODE_LOCAL, RACK_LOCAL and ANY
assert(manager.myLocalityLevels.sameElements(
Array(PROCESS_LOCAL, NODE_LOCAL, RACK_LOCAL, ANY)))
+ FakeRackUtil.cleanUp()
}
test("test RACK_LOCAL tasks") {
@@ -505,6 +506,7 @@ class TaskSetManagerSuite extends FunSuite with LocalSparkContext with Logging {
// Offer host2
// Task 1 can be scheduled with RACK_LOCAL
assert(manager.resourceOffer("execB", "host2", RACK_LOCAL).get.index === 1)
+ FakeRackUtil.cleanUp()
}
test("do not emit warning when serialized task is small") {