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

    https://github.com/apache/spark/pull/17088#discussion_r106546928
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -394,6 +394,32 @@ class DAGSchedulerSuite extends SparkFunSuite with 
LocalSparkContext with Timeou
         assertDataStructuresEmpty()
       }
     
    +  test("All shuffle files should on the slave should be cleaned up when 
slave lost") {
    +    // reset the test context with the right shuffle service config
    +    afterEach()
    +    val conf = new SparkConf()
    +    conf.set("spark.shuffle.service.enabled", "true")
    +    init(conf)
    +    runEvent(ExecutorAdded("exec-hostA1", "hostA"))
    +    runEvent(ExecutorAdded("exec-hostA2", "hostA"))
    +    runEvent(ExecutorAdded("exec-hostB", "hostB"))
    +    val shuffleMapRdd = new MyRDD(sc, 3, Nil)
    +    val shuffleDep = new ShuffleDependency(shuffleMapRdd, new 
HashPartitioner(1))
    +    val shuffleId = shuffleDep.shuffleId
    +    val reduceRdd = new MyRDD(sc, 1, List(shuffleDep), tracker = 
mapOutputTracker)
    +    submit(reduceRdd, Array(0))
    +    complete(taskSets(0), Seq(
    +      (Success, makeMapStatus("hostA", 1)),
    +      (Success, makeMapStatus("hostA", 1)),
    +      (Success, makeMapStatus("hostB", 1))))
    +    scheduler.handleExecutorLost("exec-hostA1", fileLost = false, hostLost 
= true, Some("hostA"))
    +    runEvent(ExecutorLost("exec-hostA1", SlaveLost("", true)))
    +    val mapStatus = mapOutputTracker.mapStatuses.get(0).get.filter(_!= 
null)
    --- End diff --
    
    Thanks for providing a better test case, I also modified it to include map 
output from multiple stages. 


---
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