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

    https://github.com/apache/spark/pull/1362#discussion_r15018253
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -1128,6 +1126,23 @@ class DAGScheduler(
        */
       private[spark]
       def getPreferredLocs(rdd: RDD[_], partition: Int): Seq[TaskLocation] = 
synchronized {
    +    getPreferredLocsInternal(rdd, partition, new HashMap)
    +  }
    +
    +  /** Recursive implementation for getPreferredLocs. */
    +  private
    +  def getPreferredLocsInternal(
    +      rdd: RDD[_],
    +      partition: Int,
    +      visited: HashMap[RDD[_], HashSet[Int]])
    --- End diff --
    
    It might be clearer to make this a `HashSet[(RDD[_], Int)]`. Otherwise it's 
not clear that this is just a way to remember which pairs of (RDD, partitionID) 
we've checked.


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