From 4604f28a8ed41b81c90ace49e1ea3e10a1f0b1e8 Mon Sep 17 00:00:00 2001 From: nishkamravi2 Date: Mon, 8 Jun 2015 13:47:00 -0700 Subject: [PATCH] Update SchedulerSuite.scala --- .../streaming/scheduler/SchedulerSuite.scala | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/streaming/src/test/scala/org/apache/spark/streaming/scheduler/SchedulerSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/scheduler/SchedulerSuite.scala index 1d1e3a4a92fd3..28cd23d79ffc7 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/scheduler/SchedulerSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/scheduler/SchedulerSuite.scala @@ -35,31 +35,31 @@ class SchedulerSuite extends TestSuiteBase { val receivers = (1 to numReceivers).map(i => new DummyReceiver) val executors: List[String] = List("Host1", "Host2", "Host3", "Host4", "Host5") val locations = launcher.scheduleReceivers(receivers, executors) - assert(locations(0)(0) === "Host1") - assert(locations(4)(0) === "Host5") - assert(locations(5)(0) === "Host1") - assert(locations(9)(0) === "Host5") - } + assert(locations(0)(0) === "Host1") + assert(locations(4)(0) === "Host5") + assert(locations(5)(0) === "Host1") + assert(locations(9)(0) === "Host5") + } test("receiver scheduling - no preferredLocation, numExecutors > numReceivers") { val numReceivers = 3; val receivers = (1 to numReceivers).map(i => new DummyReceiver) val executors: List[String] = List("Host1", "Host2", "Host3", "Host4", "Host5") val locations = launcher.scheduleReceivers(receivers, executors) - assert(locations(0)(0) === "Host1") - assert(locations(2)(0) === "Host3") - assert(locations(0)(1) === "Host4") - assert(locations(1)(1) === "Host5") - } + assert(locations(0)(0) === "Host1") + assert(locations(2)(0) === "Host3") + assert(locations(0)(1) === "Host4") + assert(locations(1)(1) === "Host5") + } test("receiver scheduling - all have preferredLocation") { val numReceivers = 5; val receivers = (1 to numReceivers).map(i => new DummyReceiver(host = Some("Host" + i))) val executors: List[String] = List("Host1", "Host5", "Host4", "Host3", "Host2") val locations = launcher.scheduleReceivers(receivers, executors) - assert(locations(1)(0) === "Host2") - assert(locations(4)(0) === "Host5") - } + assert(locations(1)(0) === "Host2") + assert(locations(4)(0) === "Host5") + } test("receiver scheduling - some have preferredLocation") { val numReceivers = 3; @@ -69,11 +69,11 @@ class SchedulerSuite extends TestSuiteBase { new DummyReceiver) val executors: List[String] = List("Host1", "Host2", "Host3", "Host4", "Host5") val locations = launcher.scheduleReceivers(receivers, executors) - assert(locations(0)(0) === "Host2") - assert(locations(1)(0) === "Host1") + assert(locations(0)(0) === "Host2") + assert(locations(1)(0) === "Host1") assert(locations(2)(0) === "Host2") assert(locations(1)(1) === "Host3") - } + } } /**