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

    https://github.com/apache/spark/pull/20640#discussion_r179013270
  
    --- 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 s1
    +    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 s1
    +    val status = createTaskStatus("0", "s1", TaskState.TASK_FAILED)
    +    backend.statusUpdate(driver, status)
    +    when(taskScheduler.nodeBlacklist()).thenReturn(Set("hosts1"))
    --- End diff --
    
    just to re-iterate my point above -- in many cases, having an executor fail 
will *not* lead to `taskScheduler.nodeBlacklist()` changing as you're doing 
here.


---

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

Reply via email to