diff options
author | Andrew xia <junluan.xia@intel.com> | 2013-05-31 15:40:41 +0800 |
---|---|---|
committer | Andrew xia <junluan.xia@intel.com> | 2013-06-03 10:29:23 +0800 |
commit | 606bb1b450064a2b909e4275ce45325dbbef4eca (patch) | |
tree | 51112d89e493cbb7e9080ad853f21825f613ec1f /core/src/test/scala | |
parent | ecd6d75c6a88232c40070baed3dd67bdf77f0c69 (diff) | |
download | spark-606bb1b450064a2b909e4275ce45325dbbef4eca.tar.gz spark-606bb1b450064a2b909e4275ce45325dbbef4eca.tar.bz2 spark-606bb1b450064a2b909e4275ce45325dbbef4eca.zip |
Fix schedulingAlgorithm bugs for unit test
Diffstat (limited to 'core/src/test/scala')
-rw-r--r-- | core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala b/core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala index a39418b716..c861597c6b 100644 --- a/core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala +++ b/core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala @@ -88,7 +88,7 @@ class DummyTask(stageId: Int) extends Task[Int](stageId) } } -class ClusterSchedulerSuite extends FunSuite with LocalSparkContext { +class ClusterSchedulerSuite extends FunSuite with LocalSparkContext with Logging { def createDummyTaskSetManager(priority: Int, stage: Int, numTasks: Int, cs: ClusterScheduler, taskSet: TaskSet): DummyTaskSetManager = { new DummyTaskSetManager(priority, stage, numTasks, cs , taskSet) @@ -96,8 +96,11 @@ class ClusterSchedulerSuite extends FunSuite with LocalSparkContext { def resourceOffer(rootPool: Pool): Int = { val taskSetQueue = rootPool.getSortedTaskSetQueue() - for (taskSet <- taskSetQueue) - { + /* Just for Test*/ + for (manager <- taskSetQueue) { + logInfo("parentName:%s, parent running tasks:%d, name:%s,runningTasks:%d".format(manager.parent.name, manager.parent.runningTasks, manager.name, manager.runningTasks)) + } + for (taskSet <- taskSetQueue) { taskSet.slaveOffer("execId_1", "hostname_1", 1) match { case Some(task) => return taskSet.stageId |