Skip to content

Commit

Permalink
Revert "[SPARK-26082][MESOS][FOLLOWUP] Add UT on fetcher cache option…
Browse files Browse the repository at this point in the history
… on MesosClusterScheduler"

This reverts commit 3abf45d.
  • Loading branch information
dongjoon-hyun committed Feb 9, 2019
1 parent 3abf45d commit 97f8ed4
Showing 1 changed file with 0 additions and 48 deletions.
Expand Up @@ -254,54 +254,6 @@ class MesosClusterSchedulerSuite extends SparkFunSuite with LocalSparkContext wi
assert(networkInfos.get(0).getLabels.getLabels(1).getValue == "val2")
}

test("supports setting fetcher cache") {
setScheduler(Map("spark.mesos.fetcherCache.enable" -> "true"))

val mem = 1000
val cpu = 1

val response = scheduler.submitDriver(
new MesosDriverDescription("d1", "jar", mem, cpu, true,
command,
Map("spark.mesos.executor.home" -> "test",
"spark.app.name" -> "test"),
"s1",
new Date()))

assert(response.success)

val offer = Utils.createOffer("o1", "s1", mem, cpu)
scheduler.resourceOffers(driver, List(offer).asJava)

val launchedTasks = Utils.verifyTaskLaunched(driver, "o1")
val uris = launchedTasks.head.getCommand.getUrisList
assert(uris.stream().allMatch(_.getCache))
}

test("supports disabling fetcher cache") {
setScheduler(Map("spark.mesos.fetcherCache.enable" -> "false"))

val mem = 1000
val cpu = 1

val response = scheduler.submitDriver(
new MesosDriverDescription("d1", "jar", mem, cpu, true,
command,
Map("spark.mesos.executor.home" -> "test",
"spark.app.name" -> "test"),
"s1",
new Date()))

assert(response.success)

val offer = Utils.createOffer("o1", "s1", mem, cpu)
scheduler.resourceOffers(driver, List(offer).asJava)

val launchedTasks = Utils.verifyTaskLaunched(driver, "o1")
val uris = launchedTasks.head.getCommand.getUrisList
assert(uris.stream().allMatch(!_.getCache))
}

test("accept/decline offers with driver constraints") {
setScheduler()

Expand Down

0 comments on commit 97f8ed4

Please sign in to comment.