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_r272065301
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/Stage.scala
 ##########
 @@ -116,4 +116,13 @@ private[scheduler] abstract class Stage(
 
   /** Returns the sequence of partition ids that are missing (i.e. needs to be 
computed). */
   def findMissingPartitions(): Seq[Int]
+
+  def isIndeterminate: Boolean =
+    rdd.outputDeterministicLevel == DeterministicLevel.INDETERMINATE
+
+  /**
+   * Clear the intermediate status (e.g. map status, success task, etc) for 
the stage, currently
+   * we call the function before indeterminate stage rerunning.
+   */
+  def clearIntermediateState(): Unit = {}
 
 Review comment:
   ```
   These states are not held by Stage, aren't they?
   ```
   Yep, currently these states are held by map output tracker for shuffle map 
stage.
   ```
   why it's defined in a Stage? 
   ```
   We can directly call mapOutputTracker.unregisterAllMapOutput in DAGScheduler 
just for shuffle map stage, but I think the cleaning work is common for all 
kind stages. For result stage we also need do this and the states including the 
output result.

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

Reply via email to