beliefer commented on a change in pull request #28641:
URL: https://github.com/apache/spark/pull/28641#discussion_r439288152
##########
File path:
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala
##########
@@ -889,16 +883,29 @@ class DAGSchedulerSuite extends SparkFunSuite with
LocalSparkContext with TimeLi
* @param stageId - The current stageId
* @param attemptIdx - The current attempt count
* @param numShufflePartitions - The number of partitions in the next stage
+ * @param hostNames - Host on which each task in the task set is executed
*/
private def completeShuffleMapStageSuccessfully(
stageId: Int,
attemptIdx: Int,
- numShufflePartitions: Int): Unit = {
- val stageAttempt = taskSets.last
+ numShufflePartitions: Int,
+ hostNames: Seq[String] = Seq.empty[String]): Unit = {
+ def compareStageAttempt(taskSet: TaskSet): Boolean = {
+ taskSet.stageId == stageId && taskSet.stageAttemptId == attemptIdx
+ }
+
+ val stageAttemptOpt = taskSets.find(compareStageAttempt(_))
+ assert(stageAttemptOpt.isDefined)
+ val stageAttempt = stageAttemptOpt.get
checkStageId(stageId, attemptIdx, stageAttempt)
Review comment:
Yeah!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]