Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/7770#discussion_r36055045
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -773,16 +773,26 @@ class DAGScheduler(
stage.pendingTasks.clear()
// First figure out the indexes of partition ids to compute.
- val partitionsToCompute: Seq[Int] = {
+ val (allPartitions: Seq[Int], partitionsToCompute: Seq[Int]) = {
stage match {
case stage: ShuffleMapStage =>
- (0 until stage.numPartitions).filter(id =>
stage.outputLocs(id).isEmpty)
+ val allPartitions = 0 until stage.numPartitions
+ val filteredPartitions = allPartitions.filter(id =>
stage.outputLocs(id).isEmpty)
+ (allPartitions, filteredPartitions)
case stage: ResultStage =>
val job = stage.resultOfJob.get
- (0 until job.numPartitions).filter(id => !job.finished(id))
+ val allPartitions = 0 until job.numPartitions
+ val filteredPartitions = allPartitions.filter(id =>
!job.finished(id))
+ (allPartitions, filteredPartitions)
}
}
+ // Reset internal accumulators only if this stage is not partially
submitted
+ // Otherwise, we may override existing accumulator values from some
tasks
--- End diff --
Can you point me to that test case if you've already pushed it? sorry I am
missing it.
I'm wondering about the rationale for clearing this value. There are a lot
of different cases how we can end up submitting tasks for a stage, eg. (1)
initially compute all the partitions (2) recompute all the partitions (3) only
compute some of the partitions, but for the first time for those partitions (4)
only compute some of the partitions, which have already been computed, etc.
Can you tell me the rationale for which cases get the metrics cleared? I'm
not seeing an explanation which seems consistent.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]