You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by erenavsarogullari <gi...@git.apache.org> on 2017/06/08 06:22:04 UTC

[GitHub] spark pull request #15326: [SPARK-17759] [CORE] Avoid adding duplicate sched...

Github user erenavsarogullari commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15326#discussion_r120807562
  
    --- Diff: core/src/test/scala/org/apache/spark/scheduler/PoolSuite.scala ---
    @@ -292,7 +290,100 @@ class PoolSuite extends SparkFunSuite with LocalSparkContext {
         }
       }
     
    -  private def verifyPool(rootPool: Pool, poolName: String, expectedInitMinShare: Int,
    +  test("FIFO Scheduler should not add duplicate TaskSetManager") {
    +    sc = new SparkContext(LOCAL, APP_NAME)
    +    val taskScheduler = new TaskSchedulerImpl(sc)
    +
    +    val rootPool = new Pool("", SchedulingMode.FIFO, 0, 0)
    +    val schedulableBuilder = new FIFOSchedulableBuilder(rootPool)
    +
    +    val taskSetManager0 = createTaskSetManager(0, 2, taskScheduler)
    +    val taskSetManager1 = createTaskSetManager(1, 2, taskScheduler)
    +    schedulableBuilder.addTaskSetManager(taskSetManager0, null)
    +    schedulableBuilder.addTaskSetManager(taskSetManager0, null)
    --- End diff --
    
    Related fix aims to avoid adding duplicate schedulables (Pool and TSM). However, a new TSM is created for submitted TaskSet and duplicate TSM submission does not look an expected behaviour(although logic is robust enough for this case) so these test cases can be removed for clearer perspective.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org