Skip to content

Commit

Permalink
Remove setProperty call in TaskSchedulerImplSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Dec 24, 2014
1 parent bee20df commit 3fdb554
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package org.apache.spark.scheduler

import java.util.Properties

import org.apache.spark.util.ResetSystemProperties
import org.scalatest.FunSuite

import org.apache.spark._
Expand Down Expand Up @@ -110,8 +109,7 @@ class FakeTaskSetManager(
}
}

class TaskSchedulerImplSuite extends FunSuite with ResetSystemProperties with LocalSparkContext
with Logging {
class TaskSchedulerImplSuite extends FunSuite with LocalSparkContext with Logging {

def createDummyTaskSetManager(priority: Int, stage: Int, numTasks: Int, cs: TaskSchedulerImpl,
taskSet: TaskSet): FakeTaskSetManager = {
Expand Down Expand Up @@ -164,12 +162,12 @@ class TaskSchedulerImplSuite extends FunSuite with ResetSystemProperties with Lo
}

test("Fair Scheduler Test") {
sc = new SparkContext("local", "TaskSchedulerImplSuite")
val xmlPath = getClass.getClassLoader.getResource("fairscheduler.xml").getFile()
val conf = new SparkConf().set("spark.scheduler.allocation.file", xmlPath)
sc = new SparkContext("local", "TaskSchedulerImplSuite", conf)
val taskScheduler = new TaskSchedulerImpl(sc)
val taskSet = FakeTask.createTaskSet(1)

val xmlPath = getClass.getClassLoader.getResource("fairscheduler.xml").getFile()
System.setProperty("spark.scheduler.allocation.file", xmlPath)
val rootPool = new Pool("", SchedulingMode.FAIR, 0, 0)
val schedulableBuilder = new FairSchedulableBuilder(rootPool, sc.conf)
schedulableBuilder.buildPools()
Expand Down

0 comments on commit 3fdb554

Please sign in to comment.