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

    https://github.com/apache/spark/pull/228#discussion_r10995808
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -405,12 +407,14 @@ class DAGScheduler(
         independentStages.toSet
       }
     
    -  private def jobIdToStageIdsRemove(jobId: Int) {
    +  private def jobIdToStageIdsRemove(jobId: Int): Set[Int] = {
         if (!jobIdToStageIds.contains(jobId)) {
    -      logDebug("Trying to remove unregistered job " + jobId)
    +      logWarning("Trying to remove unregistered job " + jobId)
    +      return Set[Int]()
         } else {
    -      removeJobAndIndependentStages(jobId)
    +      val removedStages = removeJobAndIndependentStages(jobId)
           jobIdToStageIds -= jobId
    +      return removedStages
    --- End diff --
    
    Neither `return` is necessary, since the whole function is just `if 
(!jobIdToStageIds.contains(jobId)) Set[Int]() else removedStages`.


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

Reply via email to