spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From squito <...@git.apache.org>
Subject [GitHub] spark pull request #20640: [SPARK-19755][Mesos] Blacklist is always active f...
Date Tue, 20 Feb 2018 17:09:28 GMT
Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20640#discussion_r169391079
  
    --- Diff: resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
---
    @@ -108,6 +108,28 @@ class MesosCoarseGrainedSchedulerBackendSuite extends SparkFunSuite
         verifyTaskLaunched(driver, "o2")
       }
     
    +  test("mesos declines offers from blacklisted slave") {
    +    setBackend()
    +
    +    // launches a task on a valid offer on slave s0
    +    val minMem = backend.executorMemory(sc) + 1024
    +    val minCpu = 4
    +    val offer1 = Resources(minMem, minCpu)
    +    offerResources(List(offer1))
    +    verifyTaskLaunched(driver, "o1")
    +
    +    // for any reason executor(aka mesos task) failed on s0
    +    val status = createTaskStatus("0", "s1", TaskState.TASK_FAILED)
    +    backend.statusUpdate(driver, status)
    +    when(taskScheduler.nodeBlacklist()).thenReturn(Set("s1"))
    +
    +    val offer2 = Resources(minMem, minCpu)
    +    // Launches a new task on a valid offer from the same slave
    +    offerResources(List(offer2))
    +    // but since it's blacklisted the offer is declined
    +    verifyDeclinedOffer(driver, createOfferId("o1"))
    --- End diff --
    
    will this actually pass?  I thought it wouldn't b/c the filtering is done inside `buildMesosTasks`,
which never calls `declineOffer` on offers that fail `canLaunchTask`.  (a separate thing which
needs fixing -- you could open another issue for that.)


---

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


Mime
View raw message