spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8735] [SQL] Expose memory usage for shu...
Date Mon, 03 Aug 2015 21:40:52 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7770#discussion_r36135056
  
    --- 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 --
    
    An accumulator value counts only if the associated task was successful. This means as
long as a single task in the stage was successful, then we can't re-initialize the set of
internal accumulators because doing so will wipe out the partial values from the succeeded
tasks. This corresponds to (3) and (4) in the cases you listed.
    
    The relevant test is in `AccumulatorSuite`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message