xuanyuanking commented on a change in pull request #24110: [SPARK-25341][Core]
Support rolling back a shuffle map stage and re-generate the shuffle files
URL: https://github.com/apache/spark/pull/24110#discussion_r272801872
##########
File path: core/src/main/scala/org/apache/spark/scheduler/ShuffleMapStage.scala
##########
@@ -87,10 +87,23 @@ private[spark] class ShuffleMapStage(
*/
def isAvailable: Boolean = numAvailableOutputs == numPartitions
- /** Returns the sequence of partition ids that are missing (i.e. needs to be
computed). */
+ /**
+ * Returns the sequence of partition ids that are missing (i.e. needs to be
computed).
+ * If the current stage is indeterminate, missing partition is all
partitions every time.
+ */
override def findMissingPartitions(): Seq[Int] = {
mapOutputTrackerMaster
.findMissingPartitions(shuffleDep.shuffleId)
.getOrElse(0 until numPartitions)
}
+
+ /**
+ * Clear the intermediate status including shuffle status and indeterminate
attempt id for
+ * shuffle map stage.
+ */
+ override def clearIntermediateState(): Unit = {
+ if (isIndeterminate) {
+ mapOutputTrackerMaster.unregisterAllMapOutput(shuffleDep.shuffleId)
Review comment:
No problem.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]