Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9175#discussion_r42568948
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/ShuffleMapStage.scala ---
    @@ -48,12 +48,33 @@ private[spark] class ShuffleMapStage(
       /** Running map-stage jobs that were submitted to execute this stage 
independently (if any) */
       var mapStageJobs: List[ActiveJob] = Nil
     
    +  /**
    +   * Number of partitions that have shuffle outputs.
    +   * When this reaches [[numPartitions]], this map stage is ready.
    +   * This should be kept consistent as 
`outputLocs.filter(!_.isEmpty).size`.
    +   */
       var numAvailableOutputs: Int = 0
     
    +  /**
    +   * Returns true if the map stage is ready, i.e. all partitions have 
shuffle outputs.
    +   * This should be the same as `outputLocs.contains(Nil)`.
    +   */
       def isAvailable: Boolean = numAvailableOutputs == numPartitions
     
    +  /**
    +   * List of [[MapStatus]] for each partition. The index of the array is 
the map partition id,
    +   * and each value in the array is the list of possible [[MapStatus]] for 
a partition
    +   * (a single task might run multiple times).
    +   */
       val outputLocs = Array.fill[List[MapStatus]](numPartitions)(Nil)
     
    +  override def findMissingPartitions(): Seq[Int] = {
    +    val missing = (0 until numPartitions).filter(id => 
outputLocs(id).isEmpty)
    --- End diff --
    
    Why not just do numPartitions - numAvailableOutputs here?


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

Reply via email to