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

    https://github.com/apache/spark/pull/15326#discussion_r109322980
  
    --- 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)
    +    schedulableBuilder.addTaskSetManager(taskSetManager1, null)
    +
    +    assert(rootPool.schedulableQueue.size === 2)
    +    assert(rootPool.schedulableNameToSchedulable.size === 2)
    +
    +    assert(rootPool.getSchedulableByName(taskSetManager0.name) === 
taskSetManager0)
    +    assert(rootPool.getSchedulableByName(taskSetManager1.name) === 
taskSetManager1)
    +  }
    +
    +  test("Fair Scheduler should not create duplicate pool") {
    +    sc = createSparkContext("fairscheduler-duplicate-pools.xml")
    --- End diff --
    
    Can you add a comment about what this is doing?  Something like 
    
    Load the scheduler pools from fairscheduler-duplicate-pools, which has 4 
entries, but two are duplicates, and make sure that the duplicates are ignored.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to