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

    https://github.com/apache/spark/pull/1561#discussion_r15332026
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/Stage.scala ---
    @@ -56,6 +58,16 @@ private[spark] class Stage(
       val numPartitions = rdd.partitions.size
       val outputLocs = Array.fill[List[MapStatus]](numPartitions)(Nil)
       var numAvailableOutputs = 0
    +
    +  /** List of jobs that this stage belong to. */
    +  val jobIds = new HashSet[Int]
    +  /** For stages that are the final (consists of only ResultTasks), link 
to the ActiveJob. */
    +  var resultOfJob: Option[ActiveJob] = None
    +  var pendingTasks: Option[HashSet[Task[_]]] = None
    --- End diff --
    
    And potentially error prone.  I don't think there is anyplace left where 
the distinction between None and Some(emptySet) is useful except for the check 
in removeStage 
(https://github.com/rxin/spark/blob/dagSchedulerHashMaps/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L357),
 and that's not really even useful anymore.  On the other hand, having a None 
where we expect at least Some(emptySet) can be a problem.
    
    I think we're better off without the Option. 


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

Reply via email to